I recently downloaded and installed SQuirreL SQL Client 3.5.0. The client would not launch through the shortcut created by the installer. A command prompt window would flash briefly. I tried running
squirrel-sql.bat through command prompt and was receiving the error:
C:\Program Files (x86)\squirrel-sql-3.5.0>squirrel-sql.bat Using java: javaw.exe "javaw.exe" is not recognized as an internal or external command, operable program or batch file.
For me, the
.bat file is located in
C:\Program Files (x86)\squirrel-sql-3.5.0.
The heading looks like:
@echo off @rem IZPACK_JAVA is filtered in by the IzPack installer when this script is installed set IZPACK_JAVA="%JAVA_HOME%" @rem We detect the java executable to use according to the following algorithm: @rem @rem 1. If the one used by the IzPack installer is available then use that; otherwise @rem 2. Use the java that is in the command path. @rem if exist "%IZPACK_JAVA%\bin\javaw.exe" ( set LOCAL_JAVA=%IZPACK_JAVA%\bin\javaw.exe ) else ( set LOCAL_JAVA=javaw.exe ) echo Using java: %LOCAL_JAVA%
It appears that
JAVA_HOME can’t be found. I removed the logic and explicitly defined the path to
@echo off set LOCAL_JAVA=C:\Program Files (x86)\Java\jre7\bin\javaw.exe echo Using java: %LOCAL_JAVA%
The client then launched successfully. When reverting back to the original
.bat, it appears that the
squirre-sql.sh file also updates itself to reflect the change, and the client continues to launched successfully.