问题
I recently downloaded Eclipse Portable to do some Java Programming anywhere. I also downloaded Java Portable.
How can I integrate Java Portable with Eclipse Portable?
I know that on the "installed" version of these two, I need to set up the CLASSPATH, PATH and JAVA_HOME variables in order to use the Java Compiler(javac.exe)
How can I set this up on a thumb drive? How can I tell Eclipse to use my portable Java?
Please help me, and if possible please be specific and detailed procedure-wise. I am planning to deploy these applications on Windows XP/7 machines.
Any efforts to answer my question will be greatly appreciated!
回答1:
The following instructions use the folder /apps
as an example, but any folder should work.
- Download and install Eclipse Portable to any folder. (64 bit or 32 bit)
- Download and install the Portable Java Runtime Environment
- For 64 bit users: Install Java Portable (64 bit) to
/../CommonFiles/Java64
- For 32 bit users: Install Java Portable (32 bit) to
/../CommonFiles/Java
- For 64 bit users: Install Java Portable (64 bit) to
- Open your Eclipse settings file
../EclipsePortable/App/Eclipse/eclipse.ini
- Set the
-vm
as your portable Java installation. (Must be placed before-vmargs
)
For 32 bit
-vm
E:/Apps/CommonFiles/Java/bin/javaw.exe
For 64 bit
-vm
E:/Apps/CommonFiles/Java64/bin/javaw.exe
回答2:
Actually you should install it from within the program itself. I followed this post by berny23 and it worked perfectly (nothing else worked).
You just need the normal java runtime environment and not the
jdk:https://portableapps.com/apps/utilities/java_portable After
putting the files into the jre folder do this:
- Run Eclipse Portable
- Go to "Help" -> "Install new software"
- Select your eclipse version by clicking the small arrow next to "Add"
- search for "java" in the search bar
- Tick "Eclipse Java Development Tools" and hit finished.
- after installation click on "restart eclipse"
回答3:
You need to set java compiler in eclipse from below path.
Eclipse -> Windows(one of the menu on top) -> Preferences -> Java -> Compiler
来源:https://stackoverflow.com/questions/8542739/how-to-integrate-eclipse-portable-with-java-portable