Forum Stats

  • 3,734,160 Users
  • 2,246,898 Discussions
  • 7,857,141 Comments

Discussions

sql.exe always kicks off a "Java Runtime Environment" message, sql script does not...

User9976769-Oracle
User9976769-Oracle Member Posts: 4
edited Jan 17, 2020 11:47AM in SQLcl

I am running Windows 10.  I currently have Java 1.8.0_231 (64 bit) installed.  JAVA_HOME points to the JRE directory, and the JRE\bin is in my path.  Whenever I just run sql.exe at a command prompt, it displays This application requires a Java Runtime Environment 1.8.0_150 and kicks off a browser pointing to a Java download.  However, if I use Cygwin Bash to run the sql script it runs and I can run the sql script in the Ubuntu WSL without problem as well.  Any ideas on what I need to do to run sql.exe in Windows?

Answers

  • Glen Conway
    Glen Conway Member Posts: 859 Gold Badge
    edited Jan 17, 2020 11:47AM

    On Windows, the exe (created with Launch4J) uses the Windows registry to find which Java JRE to run.  If it picks the "wrong" one, you can override it by copying a JRE alongside it.  That copy location changed between the 17.4 and 18.1 releases.  The last discussion that I know of that talked about this technique is  

Sign In or Register to comment.