SQLCL with Adoptopenjdk

1.3k views Asked by At

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...)

1

There are 1 answers

1
Gustavo On

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.