JavaPortableLauncherHartmut - August 4, 2009 - 7:01am
I want to run 2 Application on my stick: TV-Browser (tvbrowser.org) and Jalbum (jalbum.net). Both are so far portable and installed under the normal PortableApps-path. Both need Java >=1.5, but on the computers at work java is =1.4. No Problem: I installed JavaPortable and JavaPortableLauncher. Both are working. Now the problem: I don't want to start the java-launcher and then chose the jar-File to start - I want to start in this way: "JavaPortableLauncher.exe program.jar". What happens - Could not find program.jar. I have to type: "JavaPortableLauncher.exe e:\PortableApps\PortableProgrammFolder\program.jar" Not very good, if the driveletter changes ... In this way I got jalbum running. But tvbrowser insisted: "run tvbrowser in the tvbrowser-folder". I made a link of JavaPortableLauncher.exe to /PortableApps/TV-Browser/ - not working. I copied JavaPortableLauncher to /PortableApps/TV-Browser/ - partitialy working: now I can start JPL from that directory and then chose tvbrowser.jar. Any ideas? Regards Hartmut ( categories: )
|

What you need is a launcher
What you need is a launcher to change the current working directory to tvbrowser's directory, then run JavaPortableLauncher. Also, use relative paths, not absolute paths (i.e. JavaPortable.exe ..\PortableProgramFolder\program.jar)
Also, I would suggest moving the app's files into PortableProgramFolder\App\ProgramName, then the launcher goes in PortableProgramFolder\ since that's how the PortableApps Format is supposed to be.
The launcher could be a .bat script, or if you want to get fancy, you could use NSIS.
Quamquam omniam nescio, nec nihil scio.
What I need is a cmd.exe
I will try the relative paths. The hard thing - I didn't mention it - is: my employer has disabled the cmd.exe and command.com is not working with long names ...
NSIS: I think, Ifound, what you mean: line 121 of JavaPortableLauncher.nsi
Exec `"$PortableAppsPath\CommonFiles\Java\bin\javaw.exe" -Duser.home="$EXEDIR\Data\AppData" -jar "$JarPath"`
Very restrictive, isn't it? Could this path better be contructed and stored in the ini-file by chosing from the opendialog?
Hartmut
If you can't run batch
If you can't run batch scripts then NSIS would be the best way to go. Here's something to get you started. I haven't installed JavaPortable Launcher, so I'm not sure what folder it's in so be sure to adjust the paths on that if I'm wrong. This .exe should go in \[PortableProgramFolder] and all of your app's files should go in \[PortableProgramFolder]\App\[AppName]
JAlbum
TV-Browser
Quamquam omniam nescio, nec nihil scio.