How do I set the Java path in Eclipse so I can run it on an external drive?

PHLAK picture PHLAK · Oct 17, 2009 · Viewed 50.1k times · Source

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?

Answer

Amro picture Amro · Oct 17, 2009

Perhaps take a look at the Eclipse Portable project on SourceForge


EDIT: Alternatively, edit the eclipse.ini file and add:

-vm 
..\path-to-jre\bin\javaw.exe

[The new line after -vm matters]