portable java (windows) - new script August 28, 2010 07:19PM |
Registered: 15 years ago Posts: 26 |
@echo off rem This script runs FreeRapid using the Portableapps.com portable Sun JVM rem Credits: JavaPortableLauncher.nsi rem Thanks: Vity, author of FreeRapid; Angelo-Xavier, for comments rem Script last update: 20100805 rem MINIMUM REQUIRED versions: FreeRapid 0.83u1, Portable Java 1.6 rem 1. Download the latest portable Java update from rem [downloads.sourceforge.net] and install it in your portable rem application folder, say x:\port. So Java ends up in x:\port\Common Files\Java rem 2. unzip FRD in x:\port, so frd.exe ends up in x:\port\FreeRapid\ rem 3. create folder x:\port\FreeRapid\tools\portablejava rem 4. Copy the batch file below in x:\port\FreeRapid\tools\portablejava\runportable.cmd rem 5. Double-click runportable.cmd to start FRD. setlocal title %~n0 color f2 cls pushd "%~dp0" set thisScriptPath=%CD% pushd ..\.. set FreeRapidPath=%CD% popd set jarpath=%FreeRapidPath%\frd.jar if not exist "%jarpath%" echo FRD not found && pause && goto ERROR rem portableapps.com standard folder structure assumed set JAVA_HOME=%FreeRapidPath%\..\CommonFiles\Java if not exist "%JAVA_HOME%" echo JVM not found && pause && goto ERROR pushd "%JAVA_HOME%" & rem to rid path of intermediate ..\ set JAVA_HOME=%CD% popd set CLASSPATH=. set APPDATA=%FreeRapidPath% cd "%APPDATA%" start "" "%JAVA_HOME%\bin\javaw.exe" "-DexePath=%thisScriptPath%" -jar "%jarpath%" --portable %* goto OK & rem to bypass REMINDER for versions higher than 0.83u1 echo ================================================================= echo REMINDER: do not let FreeRider auto-restart after plugin updates. echo Just close it and restart it again with %~n0. echo note: FreeRapid versions higher than 0.83u1 don't need a restart echo after plugin updates, so you may comment out this reminder. echo ================================================================= pause goto OK :ERROR set status=1 :OK popd exit %status% endlocal & rem NOTREACHED