Here is my way:
Add the following code to your .bat activator on line 112:
if "%JAVAOK%"=="false" ( set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe" set "JAVAOK=true" set "JAVA_VERSION=1.6" )
Or where your java.exe is always located and regardless of your version of Java.
Your code should now look like this:
rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style set JAVAOK=true if not defined JAVAINSTALLED set JAVAOK=false if not defined JAVACINSTALLED set JAVAOK=false if "%JAVAOK%"=="false" ( set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe" set "JAVAOK=true" set "JAVA_VERSION=1.6" ) if "%JAVAOK%"=="false" ( echo.
When I typed the "path" in cmd, I got my class path, but "java_home", "java -v", etc. did not work. I don't know why I have such a problem, but my (ugly) workaround worked.
mike d
source share