Jar Files
807606Apr 7 2007 — edited Apr 7 2007I'm trying to create an exectionable Jar file to run on different computers.Im going to place the Jar file in exe archive with WinRar which will execute a .bat file.What command lines will set the correct path ?(unknown java version)!!At the moment Im just cycling through all the possibilties of the default location of javaw.exe ie.
If EXIST "%ProgramFiles%\java\jdk1.5.0_09\bin\javaw.exe" SET PATH=%ProgramFiles%\java\jdk1.5.0_09\bin";%PATH%
If EXIST "%ProgramFiles%\java\jdk1.5.0_08\bin\javaw.exe" SET PATH=%ProgramFiles%\java\jdk1.5.0_08\bin";%PATH%
....
Is there a way to just search for javaw.exe with cmd i dont need it to be efficiant as this will only be done once on the initial start up
Also when i packege the jar file it will run fine with
javaw -jar filename.jar
I assciated .jar with javaw.exe with this:
(changes the .jar icon)
assoc .jar=Jar
FTYPEJar="path\bin\javaw.exe" %1 %*
but i get "JVM could not find main-class"
....
Thanks in advance
Message was edited by:
Ger@newToProgramming