?
Solved

IzPack Shortcut target

Posted on 2004-08-07
4
Medium Priority
?
1,176 Views
Last Modified: 2007-12-19
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.
0
Comment
Question by:thomas908
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 13

Expert Comment

by:Webstorm
ID: 11742429
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'
...
0
 
LVL 8

Author Comment

by:thomas908
ID: 11750011
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.

0
 
LVL 13

Accepted Solution

by:
Webstorm earned 2000 total points
ID: 11750799
You can try to shorten the classpath, by modifying the starting directory (parent), so you can remove all the ../ in the classpath :

<shortcut
     name="MTShortcut"
     target='$JAVA_HOME/bin/javaw.exe'
     commandLine='-classpath log4j-1.2.7.jar;classes;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'
     workingDirectory="$INSTALL_PATH/src"
     description="A description"
     initialState="maximum"
     programGroup="no"
     desktop="yes"
     applications="no"
     startMenu="yes"
     startup="no">
</shortcut>

You can also move all the jar archive files you need to the same directory, and remove directories from the classpath.
0
 
LVL 13

Expert Comment

by:Webstorm
ID: 11750979
:-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question