Link to home
Start Free TrialLog in
Avatar of thomas908
thomas908

asked on

IzPack Shortcut target

I am using the following shortcutSpec.xml file for creating shortcut with IzPack

<shortcuts>
  <programGroup defaultName="Name of the Program Group"
                location="applications/startMenu"/>
<shortcut
     name="MTShortcut"
     target='$JAVA_HOME/bin/javaw.exe -classpath ..\log4j-1.2.7.jar;'
     commandLine='com.main.MApp'
     workingDirectory="$INSTALL_PATH/src/classes"
     description="A description"
     initialState="maximum"
     programGroup="no"
     desktop="yes"
     applications="no"
     startMenu="yes"
     startup="no">
</shortcut>

</shortcuts>

But the problem is in the target it displays double quotes

"D:\JBuilder8\jdk1.4\jre\bin\javaw.exe -classpath ..\log4j-1.2.7.jar;" com.main.MApp
If i manually remove the double quotes it works fine.

If i omit the classpath code "-classpath ..\log4j-1.2.7.jar;" then in the target it doesn't display double quotes but then the shortcut doesn't work as it needs classpath.

Please tell me  how can i retain the classapath and get rid of double quotes so that the shortcut works.
Avatar of Webstorm
Webstorm

Hi thomas908,

Try to move the classpath in the commandLine attribute:


<shortcut
     name="MTShortcut"
     target='$JAVA_HOME/bin/javaw.exe'
     commandLine='-classpath ..\log4j-1.2.7.jar; com.main.MApp'
...
Avatar of thomas908

ASKER

thanks Webstorm  
It works great. But there is another problem now. Classpath has become sort of huge something like

commandLine='-classpath ..\log4j-1.2.7.jar;.;..\mysql-connector-java-3.0.6-stable-bin.jar;..\conf.jar;..\datasocket.jar;..\photos.jar;..\help\jsearch.jar;..\help\jhall.jar;..\help\jhbasic.jar;..\help\jh.jar;..\thirdparty\xercesImpl.jar;..\thirdparty\xmlParserAPIs.jar; com.pack1.pack2.pack3.App'

Due to some reason the target in the shortcut truncates it. May be there is a limit to the number of characters in the target.
How can i solve this.

ASKER CERTIFIED SOLUTION
Avatar of Webstorm
Webstorm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial