Run 'java -version' and 'which java' and see what you get. Here's what I get on my Ubuntu 6.06 box with "Java 1.5" installed, configured, and working properly (my project requires JDK 1.5, and we have the pom.xml stuff configured as well):

$ java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

I have this in my .bashrc file, but I can't remember if I did this in ignorance of "update-alternatives" or if something wasn't working properly:
export JAVA_HOME=/usr/lib/j2sdk1.5-sun
export PATH=$JAVA_HOME/bin:$PATH

It appears that my .bashrc entries are responsible for which java binary is run:
$ which java
/usr/lib/j2sdk1.5-sun/bin/java

I do see that /usr/bin/java is linked to the Sun 1.5 JDK also:
$ /usr/bin/java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

And 'sudo update-alternatives --config java' also shows that "/usr/lib/j2sdk1.5-sun/bin/java" is the default.

If this turns out to be a Java-on-Ubuntu problem, see the "Java (1.5)" section of this page:
https://help.ubuntu.com/6.06/ubuntu/desktopguide/C/programming.html

-Max

David Lund wrote:
JDK Problem :

Im using Ubuntu Dapper Drake v6.06.

I have an existing project that I'm trying to convert to maven2 from ant. However, I'm having JDK issues, basically its compiling in JDK 1.3 rather than 1.5, see error below:

LinkGroup.java:[16,25] generics are not supported in -source 1.3
(try -source 1.5 to enable generics)
       public Collection<ContentLink> getEntities();

I have set the JAVA_HOME variable to point to JDK 1.5, however the interesting thing is I dont have java 1.3 installed so I dont know where its picking that version up from. Could this be a Unbuntu problem, as I noticed Maven2 hadn't been tested on it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to