LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   eclipse, how to specify which version of java to use (https://www.linuxquestions.org/questions/linux-software-2/eclipse-how-to-specify-which-version-of-java-to-use-399756/)

true_atlantis 01-05-2006 04:41 AM

eclipse, how to specify which version of java to use
 
im on a 64 bit machine, and i want to run eclipse... i have java 1.4 for 32 bit, and java 1.5 for 64 bit. when eclipse starts, it tries to use 1.5, is there a way to specify it to use 1.4?

pnellesen 01-05-2006 11:23 AM

I THINK there's a per-project setting you can use for this - create a new project, then look under the preferences for that project. If I can find it on my system I'll re-post.
[EDIT] - Try under "Window->Preferences->Java->Installed JREs". You can add multiple JREs/compilers there, and you can specify one of them to be default. I'm not 100% sure this will do what you need, but you might want to try it.

cafletch 01-05-2006 12:20 PM

There are 2 places to change the Java Virtual machine.
1. Globally - all projects (default) to this version

Windows -> Preferences -> Java -> Installed JREs
Check box is the default

2. Per Project
Right click on project
(NOTE: Project must be open)
Select Java Compiler
Check Enable Project Specific settings
Select the version you want

true_atlantis 01-05-2006 12:56 PM

sorry, i wasnt being specific enough. im talking about what version of java eclipse uses to run itself. eclipse wont even load because it tries to run itself under the64 bit java version.

pnellesen 01-05-2006 01:08 PM

You may have to set the "JAVA_HOME" system variable to wherever 1.4 is. I THINK that's sufficient.

cafletch 01-05-2006 01:22 PM

Write wrapper scripts...

run_eclipse_5.sh
set java_home/path to point to java 5.0
run eclipse

run_eclipse_4.sh
set java home/path to point to java 1.4
run eclipse

:)


All times are GMT -5. The time now is 09:59 AM.