3

I would like to understand some "magic", here is how to reproduce :

Get SQLCL here : https://www.oracle.com/fr/database/technologies/appdev/sqlcl.html

But SQLCL need jre 1.8 so get AdoptOpenJDK 8 here : https://adoptopenjdk.net/?variant=openjdk8&jvmVariant=hotspot

When java_home is set and sqlcl in path :

c:\[...]> java -version 
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)
c:\[...]> sql
This application requires a Java Runtime Environment 1.8.0_220

Two solution i found :

  • Install latest official JRE 1.8.
  • Copy jre from adoptopenjdk next (and NOT IN) to the sqlcl folder.

Note : i installed openjdk in the default folder but sqlcl in a custom one, on the same drive.

How do you explain that ?

(I would like to use openjdk so don't realy like the first solution, and find the second one a little dirty...)

yohannc
  • 140
  • 2
  • 9
  • We don't support OpenJDK. If you insist, I suggest you go with 11 over 8, it's much closer to Oracle JDK and should work – thatjeffsmith Sep 17 '20 at 10:26
  • 2
    Not better with OpenJDK 11 or 15. Strange thing is that SQLCL look explicitly for a folder jdk/jre/bin, sibling to it's folder. So by putting jre from openjdk 8 there it work well. – yohannc Sep 17 '20 at 12:26
  • Te problem is not related to OpenJDK. Even using Oracle JRE the problem is the same, and the solution too. Your post should be assimilated by SQLcl documentation. Because it doesn't explain how it should be used and the "This application requires a Java Runtime Environment 1.8.0_220" is absolutely misleading. – Gustavo Mar 02 '21 at 23:17

1 Answers1

3

The explanation for the second solution is that SQLcl is kind of part of SQL Developer. As if the folder SQLcl is inside the SQLDeveloper folder. And there, there is a jdk/jre folder.

Gustavo
  • 1,332
  • 2
  • 16
  • 39