问题
I'm not able to run a majority of programs from my work computer due to JRE <= 1.6 does not support switch statements for Strings. As I'm not able to install or update due to admin restrictions, would it be possible to create a portable Eclipse on a USB that incorporates the JRE (1.7) as well?
回答1:
The Eclipse part is easy. Just unzip Eclipse on your USB.
You'll have to install Java to your USB. Afterwards, go into Eclipse Window -> Preferences; Java -> Installed JREs and make sure your Java JRE or JDK is listed and the default.
Create your workspace on the USB, and you should be ready to go.
回答2:
It's fairly easy to run Eclipse on a USB drive. You just need to make sure it knows to look for Java on your USB drive rather than on the host computer.
If you have Java Portable installed on your drive, you can tell Eclipse to use it by adding the following to your eclipse.ini
file.
-vm
/PortableApps/CommonFiles/Java64/bin/javaw.exe
Note that Eclipse Portable stores the file as EclipsePortable\App\eclipse\eclipse.ini
.
回答3:
Just put your eclipse and jdk7 on the flash and run from flash. Set JDK in eclipse: Window->Preference->Java->Installed JRE...
回答4:
In my experience, since Eclipse upgraded from Indigo to Juno, the .zip they provide is already portable. It no longer creates any folders or files in the Windows user data folder.
来源:https://stackoverflow.com/questions/18129626/portable-eclipse-with-jre