0

My Squirrel SQL doesn't open when I double click the .bat file. (cmd prompt appears and then disappears)
I figured, I had just re installed latest Java version and removed older versions this morning.
How do I change the path to new Java.exe in Squirrel config file? And where is this config file for Squirrel SQL.

Nakilon
  • 34,866
  • 14
  • 107
  • 142
Shreyas NV
  • 11
  • 1
  • 1
  • 1

2 Answers2

1

Make sure that your JAVA_HOME environment variable points to an existing Java installation.

Colin Bell
  • 361
  • 2
  • 4
1

I'm going to answer this from a windows 10x64 perspective.

The config file squirrel uses for launch is called squirrel-sql.bat. It is located in the same directory as squirrel-sql.jar.

The program then sets a variable called IZPACK_JAVA with this statement:

"IZPACK_JAVA=%JAVA_HOME%"

Then it tries to set the LOCAL JAVA variable used in the bat program with your javaw.exe path so it can continue the start sequence

if exist "%IZPACK_JAVA%\bin\javaw.exe" (
  set "LOCAL_JAVA=%IZPACK_JAVA%\bin\javaw.exe"
) else (
  set LOCAL_JAVA=javaw.exe
)

If in your current windows installation you don't have the JAVA_HOME environment variable, create it in the View advanced system settings in the control panel.
If you already have it there, just Edit it to make sure the JAVA HOME environment variable is pointing either to C:\Program Files\Java\jre#.#.### where jre#.#.### is the folder version of you java installation folder (preferred option) or to C:\Program Files\Java\jre#.#.###\bin.

Should you have multiple java versions installed, you'll need to point JAVA HOME to the right version number (depending on what value your Software\JavaSoft\Java Runtime Environment\CurrentVersion registry key has).

Another tip is to put in your PATH variable the %JAVA_HOME%\bin value at the beginning of the path values.

After you create or modify your JAVA_HOME environment variable path, then restart the computer so it can take effect.

This solved it to me and I was able to run Squirrel after I created and pointed my JAVA_HOME environment variable to the right direction, and I didn't have to delete any .exe files in Windows system directories.

This also took care of the error in this question

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.

Error: could not find java.dll

Error: Could not find Java SE Runtime Environment.

Jose R
  • 738
  • 2
  • 10
  • 26