views:

341

answers:

2

I have Eclipse 3.5.1 and Java Portable (from Portableapps.com) installed on a portable hard drive and would like to point my Eclipse to use the portable apps Java version. This will allow me to use Eclipse on a computer even if Java isn't installed. How do I accomplish this?

+2  A: 

Perhaps take a look at the Eclipse Portable project on SourceForge


EDIT: Alternatively, edit eclipse.ini file and add -vm ..\path-to-jre\bin\javaw

Amro
I've been following their progress, but don't want to use anything that's not "official" for my day job. Once it officially hits and I can be sure it's stable and works well I'll definitely be using it.
PHLAK
Just noticed your edit. Will try this tomorrow and see how that works. Thanks.
PHLAK
Adding "-vm ..\path-to-jre\bin\javaw" to eclipse.ini doesn't seem to have any effect. Any other ideas?
PHLAK
Adding "-vm ..\path-to-jre\bin\javaw" as an argument worked, but I am unable to get this to work with my portable apps menu. Any thoughts?
PHLAK
I'm assuming you are replacing "..\path-to-jre" with the actual relative path to the potable JRE, right?
Amro
BTW, here is my reference: http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
Amro
Yes, I'm specifying the path, not just copy/pasting.
PHLAK
As stated in the wiki, you must NOT use quotes around the path when using the .ini file. Perhaps that was the problem?
Amro
Nope... didn't use quotes.
PHLAK
Guess I'm just going to have to wait for Eclipse Portable to be officially released then.
PHLAK
A: 

Open Eclipse.

Navigate to Window > Preferences > Java > Installed JREs

Add the JRE on your portable hard drive

Set this as your default JRE.

Jon Quarfoth
Is the the Java path it uses to RUN Eclipse? The description in the menu states "...the checked JRE is added to the build path of newly created Java projects". That doesn't sound like what I'm trying to accomplish.
PHLAK
Indeed, I misunderstood. I'm guessing @amro's solution of modifying the .ini file may have some merit for your case.
Jon Quarfoth