Running Eclipse on a machine without Java
As “portable applications” are getting more and more popular, it is important to say that Eclipse has always been portable: just unzip it anywhere and run it. The real issue is not having Java Runtime Environment installed on the machine where you want to run Eclipse. Unfortunately, installing Java on Windows requires full administrator rights.
I decided to create my portable Eclipse distribution on an USB hard drive (a Western Digital Passport) instead of an USB pen drive. The latter would be impractically too slow to support applications that require handling thousands of files.
There is no portable Java for Windows yet (shame on Sun, I mean, Oracle). But it is known that an existing Java installation on Windows may be copied anywhere, like an USB hard drive. This copy will work with some minor adjustments (like manually setting path to the java/bin directory). On Linux things are much easier, since the Java installer just extracts the content anywhere and does not require administrator permissions.
This is what I did. First I installed the most up to date Java Runtime Environment on my Windows XP machine (or virtual machine if you don’t want to waste a physical machine for Windows). Then I unzipped Eclipse on the USB hard drive. As expected, Eclipse was not able to find the Java Runtime Environment installed on the same USB hard drive. That was very easy to fix by just editing the eclipse.ini file to point to the Java copy that is on the same disc.
Here is how the directories are organized on the USB hard drive. Just to avoid problems, do not use directory names with spaces.
WD Passport (F:)
eclipse-3.5.2
eclipse.exe
eclipse.ini
...
jdk1.6.0_18
bin
java.exe
javaw.exe
...
...
...
And that is how the eclipse.ini file looks like:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
f:\jdk1.6.0_18\bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m
There is just one issue, however: Each Windows machine mounts the USB drive as an arbitrary drive letter. Today I manually edit the eclipse.ini file if the USB drive letter changes. The only solution I imagine would be a script that rewrites the eclipse.ini file whenever the drive letter changes.

