Hi, Thomas, i did strace on sql on linux and have seen, that it tries to
look up following locations
sqlcl/jre/
sqlcl/../jdk/jre/
Then i downloaded 11.0.10+9 jre from https://adoptopenjdk.net/releases.html
and put it into sqlcl/jre directory
Then sql throws some java exceptions, but it connects to the database at
least (also, no browser pointing to java download), also, i havent modified
any environment variables except PATH, maybe it's reason for errors, or,
prebuilt jre is missing some modules, i'm by no means java expert (maybe
the last comment on https://github.com/sarxos/win-registry/issues/4 is the
reason though)
:\data\utils\oracle\sqlcl\bin>sql scott/*****@dev01_h
SQLcl: Release 4.2.0.15.349.0706 RC on Mi. Mõrz 10 16:16:20 2021
Copyright (c) 1982, 2021, Oracle. All rights reserved.
java.lang.NoSuchMethodException:
java.util.prefs.WindowsPreferences.WindowsRegOpenKey(int, [B, int)
at java.base/java.lang.Class.getDeclaredMethod(Unknown Source)
at
oracle.dbtools.raptor.utils.WindowsUtility.<clinit>(WindowsUtility.java:51)
at
oracle.dbtools.raptor.newscriptrunner.SQLPlusProviderForSQLPATH.getOracleEnv(SQLPlusProviderForSQLPATH.java:66)
at
oracle.dbtools.raptor.newscriptrunner.SQLPlusProviderForSQLPATH.getSQLPATHsetting(SQLPlusProviderForSQLPATH.java:33)
at
oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:554)
at
oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:327)
java.lang.NullPointerException
at
oracle.dbtools.raptor.utils.WindowsUtility.readStringSubKeys(WindowsUtility.java:311)
at
oracle.dbtools.raptor.utils.WindowsUtility.readStringSubKeys(WindowsUtility.java:145)
at
oracle.dbtools.raptor.newscriptrunner.SQLPlusProviderForSQLPATH.getOracleEnv(SQLPlusProviderForSQLPATH.java:66)
at
oracle.dbtools.raptor.newscriptrunner.SQLPlusProviderForSQLPATH.getSQLPATHsetting(SQLPlusProviderForSQLPATH.java:33)
at
oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.handleLoginSql(SqlCli.java:554)
at
oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:327)
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select sysdate from dual;
SYSDATE
---------------------------
10.03.21
SQL>
Maybe it helps a bit.
Regards
Maxim
On Wed, Mar 10, 2021 at 7:15 AM Thomas Kellerer <thomas.kellerer@xxxxxxxxxx>
wrote:
Hello,
I am trying to run sqlcl but it refuses to use the Java JDK I have
installed.
I have SQL Developer 20.4 running without any further ado, but sqlcl only
opens the Java download page when I run it.
I have tried to put SetJavaHome with the path to my JDK into the
ide\bin\jdk.conf and sqldeveloper\bin\jdk.conf and
sqldeveloper\bin\sdcli.conf but sql.exe did not pick it up from any of
those places.
This happens when I try to run it:
c:\etc\SQLDeveloper-20.4\sqldeveloper\bin>echo %JAVA_HOME%
c:\etc\Java11
c:\etc\SQLDeveloper-20.4\sqldeveloper\bin>java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
c:\etc\SQLDeveloper-20.4\sqldeveloper\bin>where java
c:\etc\Java11\bin\java.exe
c:\etc\SQLDeveloper-20.4\sqldeveloper\bin>sql.exe
This application requires a Java Runtime Environment 1.8.0_220
c:\etc\SQLDeveloper-20.4\sqldeveloper\bin>
The same happens when I use sqlcl from the separate download (without SQL
Developer)
I also tried other Java versions/distributions but to no avail.
Any ideas?
Thomas
--
//www.freelists.org/webpage/oracle-l