alternatives for java_sdk?

Caitlyn O'Hanna ravenoak at virtualxistenz.com
Tue Dec 30 06:35:16 UTC 2008


I've encountered some oddities with the way that java is setup on my F10
system while trying to learn some java stuff.  When I try to run `mvn
jetty:run` I get the following exception over and over:

"""
java.lang.ClassCastException: gnu.java.nio.ServerSocketChannelImpl
cannot be cast to java.nio.channels.SocketChannel
"""

I've traced that back to '/usr/lib/jvm/java' pointing to
'/etc/alternatives/java_sdk' and that pointing to
'/usr/lib/jvm/java-1.5.0-gcj'.  When I do a `alternatives --config java`
it shows '/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java'. Typing `java
-version` shows the correct version, but `/usr/lib/jvm/java/jre/bin/java
-version` shows 1.5.0.  On my F9 system the last command shows 1.6.0.  I
do have JPackage 5.0 (generic) stuff installed on both systems, and I
have it set as an enabled repository normally.

I've tried `alternatives --set
java_sdk /usr/lib/jvm/jre-1.6.0-openjdk.x86_64`, which is the path my F9
system is showing, but that didn't work.

Anyone have any ideas why this is set this way and how to fix it other
than manually changing the symlinks?

Thanks!


--Caitlyn




More information about the fedora-list mailing list