Question

i have made an installer with izpack for my java desktop application ... after installation my launcher.bat file needs java build path to be set for execution .. when i add java build path it works fine ....

but .., how could i make it work in all the systems i install ..

any answer or methods would really help ..

look at my batchfiles (i have shown you the batch files where i have not added java bin path)

caller.bat

set CLASSPATH=$INSTALL_PATH\src\cs.jar;$INSTALL_PATH\lib\log4j-1.2.15.jar;$INSTALL_PATH\lib\swt.jar;.;$INSTALL_PATH\lib\swt-debug.jar;.;

set PATH=$INSTALL_PATH\src\cs.jar;$INSTALL_PATH\lib\log4j-1.2.15.jar;$INSTALL_PATH\lib\swt.jar;.;$INSTALL_PATH\lib\swt-debug.jar;C:\Program Files\Java\jdk1.6.0_33\bin;.;

java com.acti.conversionsupport.browser.SWTBrowserImpl

swtbrowser.bat

set CLASSPATH=$INSTALL_PATH\src\cs.jar;$INSTALL_PATH\lib\log4j-1.2.15.jar;$INSTALL_PATH\lib\swt.jar;.;$INSTALL_PATH\lib\swt-debug.jar;.;

set PATH=$INSTALL_PATH\src\cs.jar;$INSTALL_PATH\lib\log4j-1.2.15.jar;$INSTALL_PATH\lib\swt.jar;.;$INSTALL_PATH\lib\swt-debug.jar;C:\Program Files\Java\jdk1.6.0_33\bin;.;

java com.acti.conversionsupport.browser.CallerSocket

launcher.bat

 cd \
 cd "$INSTALL_PATH"

 nircmd exec hide caller.bat


 nircmd exec hide swtbrowser.bat

when i execute launcher after adding java bin folder to the classpath ....things works fine both of my task get executed ..but what could i do for other systems ..how could i make things work fine everywhere ?

Était-ce utile?

La solution

You may consult the Windows registry to obtains the JRE installation path as shown in this post

To consult the registry from batch see this link.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top