jPortable Launcher patch to receive JVM arguments

I have patched jPortable Launcher ( to allow to include JVM arguments in the execution of the JAR target file.

Usage is like this (tested on Windows):

sample.bat (do not use quotes around JAVA_OPTS value).

set JAVA_OPTS=-Xmx512m -Dtest=value
JavaPortableLauncher_3.0.paf_with_JAVA_OPTS_support\JavaPortableLauncher.exe myjar.jar

Patch has been done over jPortable Launcher Version 3.0 (JavaPortableLauncher_3.0.paf.exe). You can download patched version and use it right away from or you can build it by your own from the source in “Other/Source/JavaPortableLauncherU.nsi” (Instructions for building somewhere else).

Actually the only one modification in source is the following one (excerpt from patch file) to JavaPortableLauncherU.nsi:

SetOutPath $0
- Exec `"$PortableAppsPath\CommonFiles\Java\bin\javaw.exe" -Duser.home="$EXEDIR\Data\AppData" -jar "$JarPath"`
+ ; getting and including JAVA_OPTS
+ ReadEnvStr $0 JAVA_OPTS
+ Exec `"$PortableAppsPath\CommonFiles\Java\bin\javaw.exe" -Duser.home="$EXEDIR\Data\AppData" $0 -jar "$JarPath"`

Download patched version

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By :