You are here

JavaPortableLauncher

4 posts / 0 new
Last post
Hartmut
Offline
Last seen: 4 years 4 months ago
Joined: 2007-11-07 13:53
JavaPortableLauncher

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

qwertymodo
qwertymodo's picture
Offline
Last seen: 12 years 4 months ago
Joined: 2008-03-17 19:08
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.

Hartmut
Offline
Last seen: 4 years 4 months ago
Joined: 2007-11-07 13:53
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

qwertymodo
qwertymodo's picture
Offline
Last seen: 12 years 4 months ago
Joined: 2008-03-17 19:08
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

SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel User

OutFile JAlbumPortable.exe

Section ""

SetOutPath "$EXEDIR\App\JAlbum"
Exec '"..\JavaPortableLauncher\JavaPortableLauncher.exe" "$EXEDIR\App\JAlbum\program.jar"'

SectionEnd

TV-Browser

SilentInstall Silent
AutoCloseWindow True
RequestExecutionLevel User

OutFile TVBrowserPortable.exe

Section ""

SetOutPath "$EXEDIR\App\TVBrowser"
Exec "$EXEDIR\App\TVBrowser\tvbrowser.jar"

SectionEnd

Quamquam omniam nescio, nec nihil scio.

Log in or register to post comments