Get the new PortableApps.com Platform 10.0: Gorgeous themes, a full portable app store and advanced functionality
Announcing the World's Best Flash Drive: The PortableApps.com Companion

Portable Java Web Start

Bobert's picture
Bobert - February 2, 2010 - 12:46pm

I have a .jnlp file that I want to make portable. It creates and uses a folder of data in the user's home folder, and also uses the java web start cache. Is there some way to use java portable to have it store both of these things on the flash drive?
Thanks


( categories: )

-Duser.home

For Data, see -Duser.home. For the JWS cache, I'm not sure. If you can find a variable which is what it uses (like user.home or java.util.prefs or anything like those), and then put the command line argument -Dwhatever.it.is="$EXEDIR\Data\Thingy".

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

...

Emmm... Where do I change this variable?

There's no place like 127.0.0.1

In the command line

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

As in

javaws launcher.jnlp -Duser.home="$EXEDIR\Data"?

There's no place like 127.0.0.1

Yep

That's it. You should put the -D parameters before launcher.jnlp though. Also I'm not absolutely certain on the format; running javaws to see what it says I think you will need to do -JDuser.home="$EXEDIR\Data".

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

What about this...

I found this on the following page:

javaws.cfg.cache.dir=C:/path/to/cache to change the cache dir

http://lopica.sourceforge.net/faq.html#changecache

Is there some way I can do this, possibly with a paramater?

There's no place like 127.0.0.1

-JD

Try -JDjavaws.cfg.cache.dir="$EXEDIR\Data". It may work.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1