Forgive a possible newbie question. I'm running Kubuntu (Feisty) and
would like to learn java using Eclipse. I added the Eclipse package
and the GNU gcj package, thinking the GNU solution was the way to go.
After playing around with it I've discovered that I'm limitted to
1.4 java functionality. I then tried adding sun-java6-jdk and
sun-java6-jre, but when I create a new package in eclipse the only
jre option I see is the java-1.4.2-gcj one, and it can't find any
others. What packages do I need to load to get the latest java
working under Eclipse?
Thanks!
Greetings,
I have the exact same setup as you, except that I prefer Ubuntu rather
than Kubuntu.
Here is what I did. YMMV
I downloaded the Sun JDK 6 from the sun site
http://java.sun.com/javase/downloads/index.jsp (I picked JDK 6 Update 2)
and installed it in /usr/local
Then, I set my JAVA_HOME to be /usr/local/jdk1.6.0_01 (or what ever it
calls itself)
This is done in my .bashrc
Once the JAVA_HOME is set, I export it.
Then, I add a line to my .bashrc to set the PATH.
Here are the important pieces of my .bashrc
export JAVA_HOME=/usr/local/jdk1.6.0_02
export ANT_HOME=/usr/local/apache-ant-1.7.0
export TOMCAT_HOME=/usr/local/apache-tomcat-5.5.23
export ECLIPSE_HOME=/usr/local/eclipse
export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:${TOMCAT_HOME}/bin:${ECLIPSE_HOME}:${PATH}
alias runArgo="cd /usr/local/argo; java -jar ./argouml.jar &"
alias runEclipse="cd ${ECLIPSE_HOME}; ./eclipse &"
As you can see, I tend to install everything in /usr/local This lets me
use SimpleBackup to back up the contents of the directory with the
assurance that I will get everything.
The important pieces, in my opinion, are JAVA_HOME, ANT_HOME,
TOMCAT_HOME and ECLIPSE_HOME and the corresponding pieces of the PATH
line.
The alias for runEclipse lets me run eclipse from the command line in
the background so that I can do other things at the same time.
Once you've set up your environment and appropriate PATH variables, you
can start up Eclipse, and navigate to the Install Runtimes of your
Windows -> Preferences. From there, it should be easy to navigate to
where you installed the Sun JDK, assuming you followed these
instructions, or made similar changes.
Please note: If you are going to install to /usr/local, you will need
to either
a) use sudo during the installation or
b) use sudo to set the permissions correctly on /usr/local
Otherwise you will not be able to write to the directory.
Hope this helps
BTW... ArgoUML is a nice opensource UML program which you can download
from
http://argouml-downloads.tigris.org/
--
Track 9 of _Clutching At Straws_
A hand held over a candle in angst fuelled bravado
a carbon trail scores a moist fresh palm
Trapped in the indecion of another fine menu
and you sit there and ask me to tell you the story so far
http://www.songlyrics.com/song-lyrics/Marillion/Clutching_At_Straws/Slainte_Mhath/93706.html