If I download the latest jdk from http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html do I just download the .tar file, and extract it at: /usr/lib/jvm/ ?
|
feedback
|
|
There is a similar question on how to install JRE 7. Install the JDK
JDK 7 package is extracted into ./jdk1.7.0_02 directory.
- Now move the JDK 7 directory to
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1 sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
sudo update-alternatives --config java You will see output similar one below - choose the number of jdk1.7.0 - for example
Check the version of you new JDK 7 installation:
Repeat the above for:
Enable mozilla firefox plugin:
For Java 6: | |||||||
feedback
|
|
The link has instructions for installing Oracle JDK, the Java 7 browser plugin and how to revert the changes. So here is a tested (under Ubuntu 11.04 and 11.10) and working solution for installing Oracle JDK 7 and all its files so "javac" and everything else works: How To Install Oracle Java 7 (JDK) In Ubuntu Here are the commands (just for convenience):
After a few minutes, Oracle Java JDK should be successfully installed on your Ubuntu machine. You can check out the version by running these commands in a terminal:
| |||||||
feedback
|
|
This is how I installed it in Oneiric just now. It will be a rather lengthy answer, but it worked for me. Download latest Java SDK 1.7.0 from Oracle. Then extract it to /usr/lib/jvm:
After that I created .java-1.7.0-oracle.jinfo file in /usr/lib/jvm with the following contents:
Then you need to tell update-alternatives about all the new stuff:
Now you can use update-alternatives to select newly installed Java SDK.
This worked for me, if there is a more elegant way (without using third-party PPAs) I'd be glad to hear about it. I still need to test Firefox if I can run Java in it. | ||||
feedback
|
|
From http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html :
| |||
|
feedback
|
|
I wrote a blog post with a very detailed explanation on how to install Java 7 on Natty, both OpenJDK's and Sun's: http://brunoreis.com/tech/intalling-java-ubuntu-natty/ OpenJDK is installed from the PPA provided by Damien Lecan, and Sun's is installed manually. As far as know, until now that is the only guide that is correct both in the steps and the explanation. If you find any problems, post a comment there and I will try to fix it. Good luck. | |||||
feedback
|
|
Get the JDK from Oracle/Sun, download the Java JDK at: http://www.oracle.com/technetwork/java/javase/overview/index.html Pls download or move the downloaded file to your homeDirectory ~ for ease. Note :
Run in a terminal..
Now enable Java (by running individually) :
Close all browsers. Create a Mozilla plugins folder in your home directory :
Create a symbolic link to your Mozilla plugins folder. For 64-bit systems, replace ‘i386’ with ‘amd64’:
Testing :-
Output:- java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode) user@host:~$ javac -version Output :- javac 1.7.0_04 Verify JRE at | ||||
|
feedback
|
|
I propose one way to make easier the installation of Oracle's Java 7. Since Ubuntu does not provides the Oracle's Java 7 packages, I'm providing a collection of Ubuntu packages on my own package repository. The packages are fully integrated in the Ubuntu way to support Java. You will be able to select the Oracle's Java 7 alternative with the standard tools: update-alternative or update-java-alternative. The main page of my contribution is: http://www.arakhne.org/jdk/index.html To obtain the packages, you only need to add my package repository into your system configuration. The process is explained in http://www.arakhne.org/ubuntu.html Stéphane. | |||
feedback
|
