You are here

Portable Java Howto

12 posts / 0 new
Last post
tappet
Offline
Last seen: 10 years 2 months ago
Joined: 2006-01-04 20:32
Portable Java Howto

I've seen a lot of references to installing a JRE on a USB key. Can anyone provide a set of instructions for doing this? I know John has said that he's got one in the works, but he seems to have a lot on his plate at the moment. Maybe someone can help him out a little. It would be great if the howto could also include things like where the JRE needs to be located to run various apps using relative paths, and so forth, so wannabe-geeks like me, who don't automatically think of these things, could implement it.

If this has already been addressed, I applologise. I did a forum search, but didn't find any instructions.

Thanks,

Tappet

RossGoodman
Offline
Last seen: 1 year 10 months ago
Joined: 2005-12-19 12:51
I'm not sure if I'm missing

I'm not sure if I'm missing the point but:

I simply copied an existing installed JRE onto my USB and then referenced it.

For Example my batch to load FreeMind using the USB JRE is as follows:

@echo off
..\cmdow\cmdow @ /hid
..\jre1.5.0_06\bin\java -cp lib\freemind.jar;lib\ant\lib\jaxb-api.jar;lib\ant\lib\jaxb-impl.jar;lib\ant\lib\jaxb-libs.jar;lib\ant\lib\namespace.jar;lib\ant\lib\relaxngDatatype.jar;lib\ant\lib\xsdlib.jar;lib\ant\lib\jax-qname.jar;lib\ant\lib\sax.jar;lib\ant\lib\dom.jar freemind.main.FreeMind
..\cmdow\cmdow @ /vis

Does that help ?

tappet
Offline
Last seen: 10 years 2 months ago
Joined: 2006-01-04 20:32
I think so

It was the referencing part that I was missing. Thanks. How do you go about finding out what needs to go into the reference .bat? Is there something like regmon for Java reverences I should look at, or should I just reference all the components? (Sorry for all the noob questions - I'm learning all this stuff bit by bit.)

Tappet
__________________
"I am still learning."
--Socrates

Tappet
__________________
"I am still learning."
--Socrates

RossGoodman
Offline
Last seen: 1 year 10 months ago
Joined: 2005-12-19 12:51
This was the script that was

This was the script that was supplied with FreeMind as installed:

@echo off
java -cp lib\freemind.jar;lib\ant\lib\jaxb-api.jar;lib\ant\lib\jaxb-impl.jar;lib\ant\lib\jaxb-libs.jar;lib\ant\lib\namespace.jar;lib\ant\lib\relaxngDatatype.jar;lib\ant\lib\xsdlib.jar;lib\ant\lib\jax-qname.jar;lib\ant\lib\sax.jar;lib\ant\lib\dom.jar freemind.main.FreeMind

All I added was:
"..\jre1.5.0_06\bin\" before the java command to tell it to run java from the usb.

I also added:
"..\cmdow\cmdow @ /hid"
"..\cmdow\cmdow @ /vis"
to hide the extra dos window.

tappet
Offline
Last seen: 10 years 2 months ago
Joined: 2006-01-04 20:32
OK, now I get it.

OK, now I get it. Thanks!

Tappet
__________________
"I am still learning."
--Socrates

Tappet
__________________
"I am still learning."
--Socrates

mariela (not verified)
Portable JRE configuration for freemind

Hello

I just read the forum topic in order to install JRE onto my USB pen drive to be able to run Freemind without having to install JRE in the computer I'm using, since I don't have admin rights.

I keep all my portable apps in a folder named "programs" in my USB pen drive. So I read the instrucions above and:

1.- Copied the whole jre1.5.0_06 folder from another computer into my USB pen key in the folder "programs"

2.- Edited the "freemind" file at the root of the "freemind directory" that had initially:

@echo off
java -cp lib\freemind.jar;lib\ant\lib\jaxb-api.jar;lib\ant\lib\jaxb-impl.jar;lib\ant\lib\jaxb-libs.jar;lib\ant\lib\namespace.jar;lib\ant\lib\relaxngDatatype.jar;lib\ant\lib\xsdlib.jar;lib\ant\lib\jax-qname.jar;lib\ant\lib\sax.jar;lib\ant\lib\dom.jar freemind.main.FreeMind

and pasted the suggested code above:

@echo off
..\cmdow\cmdow @ /hid
..\jre1.5.0_06\bin\java -cp lib\freemind.jar;lib\ant\lib\jaxb-api.jar;lib\ant\lib\jaxb-impl.jar;lib\ant\lib\jaxb-libs.jar;lib\ant\lib\namespace.jar;lib\ant\lib\relaxngDatatype.jar;lib\ant\lib\xsdlib.jar;lib\ant\lib\jax-qname.jar;lib\ant\lib\sax.jar;lib\ant\lib\dom.jar freemind.main.FreeMind
..\cmdow\cmdow @ /vis

Tried to run the Freemind application and still didn't work...

Has anyone got an idea?

Is the path wrong?

Thank you...

RossGoodman
Offline
Last seen: 1 year 10 months ago
Joined: 2005-12-19 12:51
Tell me more

Did you get an error?
Can you get java to run at all, do you see javaw.exe in the process list.
Have you run your freemind on another PC?

tomgardner
Offline
Last seen: 8 years 4 days ago
Joined: 2007-01-31 10:25
I can't get it to run either

I did as mariella did, which seems to be what was recommended, and tested it by renaming the java folder in my Windows program files.
However, Freemind still tries to open the Windows Java folder, (which it now can't find), rather than the one in my Portable Apps folder.

I have yet to try it on a PC that has no JRE on it at all to see if that forces it to use the portable version. Is this likely? Am I doing something wrong here?

Slightly off topic, but I found that by copying the latest JRE to my Java folder and giving it the same name as the old version folder (e.g. j2re1.4.2_03), I could run apps that need v1.5 without having to install it (as I don't have admin rights at work to do this). Presumably without being able to modify the registry key that points to the installed version folder, this fools the system.

wpaladin (not verified)
Portable Java IDE?

Hi,

It would be nice if JCreator (www.jcreator.com) were available
as a portable app.

JC is a small footprint Java IDE, lo-price after trial period,
with far less complexity than Eclipse.

Bill
Long Island, New York

Skadar
Offline
Last seen: 12 years 6 months ago
Joined: 2006-09-14 13:01
This worked perfectly! Thanks!

I use Freemind all the time. These instructions worked perfectly. Thanks!

Now I'm running Freemind from my USB drive.

kalyan
Offline
Last seen: 12 years 6 months ago
Joined: 2006-09-18 22:57
hi

I am new and i am not able to catch what you are discussing can yo plz tell me indetail about how to create
a porable java

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2006-01-06 21:27
Up above

https://portableapps.com/node/1141#comment-6250
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

Topic locked