Tag Info

Hot answers tagged

514

There is a similar answer on how to install JRE 8. Install Java JDK The manual way Download the 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension. Uncompress it tar -xvf jdk-8-linux-i586.tar.gz (32bit) tar -xvf jdk-8-linux-x64.tar.gz (64bit) JDK 8 package is extracted into ./jdk1.8.0 directory. N.B. check carefully ...


137

There is a similar answer on how to install JDK 8 Install the JRE Download the 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension and uncompress it tar -xvf jre-7-linux-i586.tar.gz JRE 7 package is extracted into ./jre1.7.0 directory. Now move the JRE 7 directory to /usr/lib sudo mv ./jre1.7.0* /usr/lib/jvm/jre1.7.0 ...


83

Here is a tested 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): Download the latest Oracle JDK 7 from here. Extract the downloaded Oracle Java JDK archive in your home folder - a new folder called ...


80

From http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html : sudo apt-get install python-software-properties sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-jdk7-installer Are PPA's safe to add to my system and what are some "red flags" to watch out for?


23

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: cd /usr/lib/jvm/ sudo tar -xvzf ~/jdk-7-linux-x64.tar.gz sudo mv jdk1.7.0 java-7-oracle sudo ln -s java-7-oracle java-1.7.0-oracle After that I created ...


18

If OpenJDK isn't preferred, you can install the Oracle version from a ppa (which is a lot easier than manual installation, and you should also receive updates automatically). Adding via ppa also ensures that you are using the correct architecture (32 vs 64 bit). sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install ...


13

Feel free to use this as a reference to tinkering with Java at runtime. Choosing your JRE To choose your JRE, use sudo update-alternatives --config java This will give something like the following output. Selection Path Priority Status ------------------------------------------------------------ 0 ...


13

This solution will give you clean built packages just as they used to ship with Ubuntu before Oracle came around. The answer First the answer, then the explanation. Open a terminal and copy and paste the following, line by line. wget https://raw.githubusercontent.com/ladios/oab-java6/master/oab-java.sh -O oab-java.sh chmod +x oab-java.sh sudo ...


11

Note: update-java-alternatives won't work with manual installations. In any case, it doesn't look like it has any special abilities which update-alternatives doesn't have, except convenience. As a graphical alternative to @AnwarShah's command-line method, consider using Gnome Alternatives (sudo apt-get install galternatives): Start GAlternatives, ...


10

On AMD64 you need modify a little the command to create the symbolic link: ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/ only change the i386 to amd64.


10

AN UPDATED ANSWER: I suggest using one of the installers from the webupd8team ppa in this way: 1) Enter these 2 commands in the Terminal to add this PPA and update your packages list: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update 2) Enter one (or more) of these commands to install the proprietary Java(s) you require: sudo apt-get ...


6

I appreciate all the answers above. I want to add this answer to simplify things which is done by www.webupd8.org to make installation in 2-5 minutes This installation includes sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer That's all !! Now to check the java version java -version The ...


5

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 : Dont worry about what JDK to download for JEE. Pls skip copying the Prompt " user@host:~$ ". Hit enter after each command. Run in a terminal.. ...


4

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/installing-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 ...


4

To make it available for all users : sudo ln -s /usr/lib/jvm/jre1.7.0/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins/ for x86_64 : sudo ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so /usr/lib/mozilla/plugins/


4

The simplest way to get Java installed with Ubuntu 12.04 is to run sudo apt-get install default-jdk Do not mess with downloading any files - just use the package manager.


4

Use javaws to launch the .jnlp file e.g javaws -Xignoreheaders -headless Downloads/ContestAppletProd.jnlp & You can install javaws using the following commands: sudo apt-get install default-jre sudo apt-get install icedtea-netx


4

I actually use these commands to install jdk1.6.0_25. sudo update-alternatives --install /usr/bin/java java /media/mydisk/jdk/bin/java 100 sudo update-alternatives --install /usr/bin/javac javac /media/mydisk/jdk/javac 100 sudo update-alternatives --install /usr/bin/java_vm java_vm /media/mydisk/jdk/bin/java_vm 100 sudo update-alternatives --install ...


3

You have to use the jre version in the jdk, you can do so by executing sudo update-alternatives --set java /usr/local/java/jdk1.7.0_17/jre/bin/java sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_17/jre/bin/javaws Normally this can be done by using update-java-alternatives with a .jinfo file, but for some reason you can't find them ...


3

You can start Chrome with a key google-chrome --allow-outdated-plugins But it is a bug, that will be fixed soon, I hope


3

You need the browser plugin for Java to work in Firefox. sudo apt-get install icedtea-plugin Then sudo update-alternatives --config java Check which version is activated: java -version Install the icedtea-web plugin if not yet installed: sudo apt-get install icedtea-web


3

It appears that the Java verification applet doesn't work with the implementation of Java that Ubuntu uses (OpenJDK), but other applets should work if you install the Java web plugin, which is a plugin that lets Java applets run in a web browser. According to the community documentation for Java, Browser plugin Install the icedtea6-plugin ...


3

Yes, it is safe to have more than one version of Java installed. Ubuntu uses the Debian alternatives system to make this work safely and smoothly.


3

This set of instructions is for 64bit Java installation Download Java to the Downloads folder 1 - Open Terminal, copy & paste the following commands sudo mkdir -p -v /opt/java/64 Press Enter cd Downloads && tar xvzf ~/Downloads/jre-7u4-linux-x64.tar.gz Press Enter sudo mv -v ~/Downloads/jre1.7.0_04 /opt/java/64 Press Enter sudo ...


3

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 ...


2

The easiest way is just downloading java 7 with Netbeans here - http://www.oracle.com/technetwork/java/javase/downloads/jdk-7-netbeans-download-432126.html


2

Answering my own question: I can't find a way to do this, I just went with the 32-bit JRE package from Sun and installed it into /opt. I had similar problems installing WINE. But that appears to be just about aptitude being broken w.r.t. multiarch, apt-get install WINE worked just fine.


2

Multiarch support is still in very early stages. In 11.10, there was enough multiarch for flash and skype. In 12.04, it'll cover everything ia32-libs did, but not everything else. That'll take years, although the most popular bits will probably come first.


2

Open Software Center and type jre there.


2

This worked for my development needs of being able to run/compile 1.6 or 1.7. Previously I was just running 1.6 from a Ubuntu apt package. Download 1.7 gzip http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html Extract to folder Update JAVA_HOME and PATH in bash file JAVA_HOME=/opt/java/jdk1.7.0_25 export JAVA_HOME ...



Only top voted, non community-wiki answers of a minimum length are eligible