Tag Info

Hot answers tagged

535

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


141

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


24

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


14

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

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


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.


6

I appreciate all the previous answers. 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

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/


5

Get the JDK from Oracle/Sun; download the Java JDK at: http://www.oracle.com/technetwork/java/javase/overview/index.html Please download or move the downloaded file to your home directory, ~, for ease. Note: Don't worry about what JDK to download for JEE. Please skip copying the Prompt " user@host:~$ ". Hit enter after each command. Run in a ...


5

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


5

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


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

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.


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


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

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


2

Try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below. sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update To install java JRE sudo apt-get install sun-java6-jre sun-java6-jre-plugin To install JDK sudo apt-get install sun-java6-jdk


2

Java is fully backwards compatible, you can see it by the version numbers. JAVA 6 and 7 are really 1.6 and 1.7 so you only needs the latest version installed. You may need more packages than waht are provided in the SDK, check this answer for more help. Following old tutorials runs the risk of not being able to follow them since they don't work anymore. ...


2

Use OpenJDK because it do not contain the closed-source Oracle browser plugin that have been the attack vector for all the latest zero-day exploits. If you want a JRE with included security updates install: openjdk-7-jre OpenJDK builds in Ubuntu are based on IcedTea, this is good because the IcedTea team apply the latest security updates, that fix issues ...


2

The problem is with ubuntu 13.10's gtk libraries. The global menu that ubuntu has, GTk is not able to use it for its menu options. Hence, as @bogdan said, either use the command UBUNTU_MENUPROXY= ./smartgit.sh or open up the smartgit.sh / smartgithg.sh in your favorite text editor and add the line below right after the comments in the file, ...


2

To solve problem you have to copy libpkcs11wrapper.so to your compatible Java version's lib directory. For Ubuntu 14.04 and Oracle's Java 8 lib directory is /usr/lib/jvm/java-8-oracle/jre/lib/amd64/ not /usr/lib



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