Skip to content
⌘ NSIS Forum Archive

java shortcut

4 posts

bobvdp#

java shortcut

I want to create a shortcut with the following contence:
"C:\Program Files\Java\jre1.5.0_02\bin\java.exe" -classpath "E:\Bob\java\Java\UWDSlide_java;C:\Program Files\Java\jre1.5.0_02\lib\comm.jar;E:\Bob\java\Java\UWDSlide_java\AbsoluteLayout.jar;" UWDSlide_Progr COM1 DD E:\Bob\java\Java\UWDSlide_java\img\ GB

(I copy and paste this string from a existing, working shortcut).
In particilar the " sign before and after classpath are essential.
When using the default syntax, CreateShortcut the " sign will partly destroy the commandline string.

Thanks,
Bob
kichik#
Assuming I understand your problem, this should help:



If not, please try explaining again. An example of the CreateShortcut line you've used would help understanding the problem.
bobvdp#
I noticed the faq, but witout succes
I used
StrCpy $5 " -classpath "
StrCpy $5 "$5'"
StrCpy $5 "$5$INSTDIR;$1\lib\comm.jar;$INSTDIR\AbsoluteLayout.jar"
StrCpy $5 "$5'"
StrCpy $5 "$5 UWDSlide_Progr COM1 DD $INSTDIR\img\ GB"
CreateShortCut Unidrive.lnk "$1\bin\java.exe" "$5"

However the exact string should be:
java.exe -classpath "thisandthat;endsomemore;somethingelse;" UWDSlide_Progr COM1 DD $INSTDIR\img\ GB
The string after -classpath must be quoted, how to do that?

Bob
RobGrant#
StrCpy $5 ' -classpath "'
StrCpy $5 '$5$INSTDIR;$1\lib\comm.jar;$INSTDIR\AbsoluteLayout.jar"'
StrCpy $5 '$5 UWDSlide_Progr COM1 DD $INSTDIR\img\ GB'
CreateShortCut Unidrive.lnk '$1\bin\java.exe' '$5'
Just quickly glanced at this thread, sorry if you've tried this already but thought it might help.