You are here

Java Jars and -D

4 posts / 0 new
Last post
AaronSDG
Offline
Last seen: 16 years 1 month ago
Joined: 2008-10-01 13:36
Java Jars and -D

The app I'm trying to portabilize (Baralga) only requires that the variable "user.home" be overridden. I currently do that with a simple Windows shortcut that executes:
$ javaw -Duser.home=Data -jar baralgaXXX.jar

I have been trying to create a PortableApps launcher but run in to a problem since executing the JAR directly does not allow me to pass the -Duser.home parameter and I can't execute javaw.exe directly because the launcher wants to find it in the App folder. I cannot be the only one to have this issue so I was wondering if somebody could point me to an app or something that would explain the best practice for portablizing Java jars in this way.

Thanks for your time!
Aaron

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 6 months 2 weeks ago
Joined: 2006-11-18 10:26
Is that variable a Java

Is that variable a Java variable or a system variable? Is user.home the same as Window's %HOMEPATH% or %HOMEDRIVE%%HOMEPATH% variables?

Open a command prompt and execute the following if you don't know what I mean.

echo %HOMEPATH% [enter]
echo %HOMEDRIVE%%HOMEPATH% [enter]

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Ph4n70m
Ph4n70m's picture
Offline
Last seen: 2 years 7 months ago
Joined: 2007-01-12 19:22
%HOMEDRIVE%%HOMEPATH% is the

%HOMEDRIVE%%HOMEPATH% is the same of %USERPROFILE%, no?

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 6 months 2 weeks ago
Joined: 2006-11-18 10:26
Yep, I see that now

I did the 'set' command at a command prompt and just picked up on the first two I saw alphabetically. Missed that one.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

Log in or register to post comments