It is often the case that you need to have multiple Java versions installed on a single machine. My own issue was that I needed Eclipse to be configured to use several versions of Java (toolbar menu Window -> Preferences -> Java -> Installed JREs) and in order to make them known to Eclipse I first need to have their installation folders.
On a RedHat Linux, once you have a Java installed, then installing a next one is not be possible, the OS will return error that Java was already installed. To workaround you need to do this.
1. Install your first java.
2. Rename its folder located in /usr/java/....
3. Delete the symbolic links "default" and "latest" in that same directory.
4. Uninstall Java from the Applications -> Add/Remove Software (under RedHat) or whichever way it is done on your Linux version.
5. Install the next java the usual way you do it.
This will create a new folder in /usr/java/ and will also create new "default" and "latest" symlinks in that same location.
Uninstalling Java will not remove its folder if you first rename it and then run uninstall, so you will keep it for further work. Switching to another active system java is just done by editing the symlinks "default" and "latest" pointing them to another java folder in /usr/java/...
You may also need to adjust the links in /etc/alternatives/java in order to make java work (be accessible) but this is subject for another post.
Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts
Wednesday, 7 January 2015
Saturday, 13 December 2014
How to attach in Eclipse the source code of Java language
If you need to browse the original code of the Java language, you need to attached its sources to the installed JRE preference page, as by default it is not attached when you specify your working JRE.
In Eclipse, select Windows -> Preferences -> Java -> Installed JREs , expands
That should be right under the JDK folder , for example: C:\Program Files (x86)\jdk7
In Eclipse, select Windows -> Preferences -> Java -> Installed JREs , expands
rt.jar
, select “Source attachment” and find the src.zip
from your disk drive.That should be right under the JDK folder , for example: C:\Program Files (x86)\jdk7
Subscribe to:
Posts (Atom)