Old 9th February 2012, 22:06   #1
kid_wonder
Junior Member
 
Join Date: Aug 2011
Posts: 1
Dealing with Shortcuts and Java Upgrades

I am curious if anyone has a solution for this scenario, or an alternative way of creating java launch shortcuts

. During our install we verify a minimum JRE version is installed
. We grab the path to that JRE
. We place that path in a desktop launch shortcut (eg "$JreHome\bin\javaw.exe foo.jar")

My concern is that the uninstall, or upgrade, of the JRE will potentially break this, or not allow the user to make use of an upgrade (if they place it in a different directory).

Here is how we create the shortcut:
CreateShortcut "$INSTDIR\${APPLICATION_NAME}.lnk" "$JreHome\bin\javaw.exe" \
"-jar foo.jar ." "$INSTDIR\some.ico"
kid_wonder is offline   Reply With Quote
Old 13th February 2012, 18:50   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
How about having your shortcut point to a silent C or NSIS executable which does the execution. If you go with NSIS, something like this will do:
code:
OutFile LaunchFoo.exe
SilentInstall silent
Icon some.ico
SetCompress off

Section
; Get Java install path here.
Exec `"$R0\bin\javaw.exe" -jar foo.jar`
SectionEnd

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump