I've got java-6-openjdk and java-7-openjdk running on Natty (11.04) on one machine and successfully toggle between them using update-alternatives --config java (or javac).
For some reason this doesn't seem to work on a second machine of identical spec.
I want to run my Tomcat with Java 7 but all I found about configuring it doesn't work. The management interface of Tomcat shows 1.6.0_24-b24 as Java version.
Hello, the default java installation is openJDK.
/usr/bin/java -> /etc/alternatives/java
/etc/alternatives/java -> /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
I want to install JDK 1.6, and executed this command:
Code:
alternatives --install /usr/bin/java java /usr/lib/java/jdk1.6.0_45/bin/java 20000
But the symbolic link does change at all. What might be wrong?
What is the command update-alternatives used for?
Take this example:
sudo update-alternatives --install /usr/bin/java java /usr/local/java/jre1.7.0_09/bin/java 1
What does it do? How is it different from adding jdk to the path?
Let's say that I have run the command. How would I revert back to the original state?
Compiling is easy but when using java to run the programs, it gives Exception found. I am using Ubuntu 12.04 without internet connections. Also, installed Oracle JDK7 and JRE7. Also did the update-alternatives command on java, javac and javaws. Changed the machine java in /etc/profiles. PATH is pointing to oracle java folder.
So I downloaded the latest version of Java from Oracle so I could get a 64bit JVM on Ubuntu Server 10.10. After extracting the file and updating the alternatives I went to check my installation by running java -version and I get this error: -bash: /usr/bin/java: cannot execute binary file
I'm at a loss for what to do here.
I want to have two JDKs. The first one was installed a long time ago to /usr/lib/jvm/java-7-oracle/.
I've installed java by following this instruction and also had installed java 7 from elsewhere but I can't seem to get it to work..
I am trying to install my ubuntu using the downloaded jdk1.7.0_11 and jre1.7.0_11,and i traced the questions from here and followed tat steps even it is not installing the java.
In the terminal , I am getting an error like this
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jre1.7.0_11/bin/