You are here

PortableApps.comLauncher with x64 Java support

2 posts / 0 new
Last post
Moravuscz
Offline
Last seen: 2 months 3 weeks ago
Joined: 2018-02-12 09:53
PortableApps.comLauncher with x64 Java support

Since We can have both 32 and 64 bit versions of Java installed in the CommonFiles I thought it should be possible to run 64 bit Java if available and fallback to 32 bit depending on your system just like any other app can and depending if you installed 64 bit Java version from PAL. Turns out Java.nsh only had a check for $PortableAppsDirectory\CommonFiles\Java and $PortableAppsDirectory\CommonFiles\Java64 was not handled.

Edit this file: %PAL:PortableAppsDir%\PortableApps.comLauncher\Other\Source\Segments\Java.nsh
Add these 3 lines right after StrCpy $JavaDirectory $PortableAppsDirectory\CommonFiles\Java (found on line 24)
${IfNot} $Bits == 32
StrCpy $JavaDirectory $PortableAppsDirectory\CommonFiles\Java64
${EndIf}

Generate your launcher exe again and now you can use this and it will use appropriate Java version:
ProgramExecutable=javaw.exe ; Or java.exe if you want the console window to open
ProgramExecutable64=javaw.exe

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 4 months 6 days ago
DeveloperModerator
Joined: 2008-07-24 18:46
Coming

This change has already been made for the next release: https://github.com/PortableApps/Launcher/commit/1d638e03af363518ed921cdc...

Log in or register to post comments