View Full Version : [ubuntu] Issues with "java" command. Help needed.
MikeRaines
December 12th, 2008, 08:07 AM
Hi guys,
I am working on a project, and while trying to fix something, I managed to get the openJDK as well as java6 installed. When I call the "java" command from the command line it fails due to some openJDK component. How do I retarget the "java" command to point to the java6 compiler?
Thanks!
Bear Knuckle
December 12th, 2008, 09:30 AM
Hi guys,
I am working on a project, and while trying to fix something, I managed to get the openJDK as well as java6 installed. When I call the "java" command from the command line it fails due to some openJDK component. How do I retarget the "java" command to point to the java6 compiler?
Thanks!
First of all, "java" is not the compiler (which is "javac"), it's the command to start a JVM and executed byte code.
You can run
update-alternatives --config java
to reconfigure the "java" path.
jespdj
December 12th, 2008, 01:08 PM
Note, update-alternatives must be run with sudo:
sudo update-alternatives --config java
Bear Knuckle
December 12th, 2008, 01:18 PM
Note, update-alternatives must be run with sudo:
sudo update-alternatives --config java
Damn, at least leave this small task to him, if not even the forums search was in his quest... ;-)
Poyntz
December 12th, 2008, 01:26 PM
and if that doesn't work
1. backup the java files temporarily
2. uninstall java via synaptic or aptitude
3.
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-source sun-java6-jdk
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.