Java is a programming language originally developed by Sun Microsystems. Questions here should be about the installation, configuration and troubleshooting a JVM (Java Virtual Machine) or a JRE (Java Runtime Environment). Programming questions (unless directly related to Ubuntu) should be asked ...

learn more… | top users | synonyms

356
votes
23answers
586k views

How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle? Before release Java ...
251
votes
0answers
338k views

How do I install Oracle Java JDK 7? [duplicate]

If I downloaded the latest JDK from Oracle, do I just download the .tar file and extract it to /usr/lib/jvm/?
102
votes
11answers
182k views

How do I install Java?

How do I install Java, including in my browser, so websites with Java work?
90
votes
11answers
219k views

How do I install Oracle JDK 6? [duplicate]

Most of the software is not thoroughly tested with Java 7 and I would like to install Oracle's JDK 6.0 on Ubuntu 11.10. Could someone please provide me the instructions for the same?
61
votes
9answers
188k views

How to completely uninstall Java?

How can I completely remove all traces of Java on my system? I already know how to install it in case I need it again.
61
votes
6answers
126k views

How to install OpenJDK 8 on 14.04 LTS?

IMPORTANT: If you need this backported to 14.04, vote for this bug: https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1341628 Java 8 is now available according to ...
53
votes
2answers
127k views

How do I get Java plugin working on Google Chrome?

Google has updated its Chrome browser to version 35. This new version uses Aura in place of GTK2 and no longer supports NPAPI plugins like Java (both OpenJDK and Oracle). PPAPI plugins like ...
44
votes
1answer
106k views

How do I update Oracle Java 7 (JDK and JRE)

Recently, I've installed JDK 7 from the Oracle site, using these instructions. Now, I'm wondering what is the correct method to update it (or, better, to keep up-to-date automatically)? For instance, ...
43
votes
7answers
174k views

Installing Chrome Java Plugin

I've been trying to install the Java plugin for Chrome for a couple hours now, and I figured it was time to ask people with more experience. I can't seem to get it working. My current Java version is ...
42
votes
10answers
136k views

How to correctly remove OpenJDK/OpenJRE and set SunJDK/SunJRE as Default

Ubuntu seems to favour OpenJDK/JRE very much over Sun JDK/JRE. Even after I installed Sun JRE, JDK and plugin and spent some time plucking out OpenJDK-related packages, apt-get has installed them back ...
40
votes
1answer
173k views

How to install Oracle Java on Ubuntu 14.04? [duplicate]

I am using Ubuntu 14.04.1 LTS, x64 architecture, and I specifically need to install Oracle Java. Now I know there are some instructions on the website which I follow but the same website does not ...
39
votes
3answers
98k views

How to set JAVA_HOME for OpenJDK?

How can we set JAVA_HOME environment variable for OpenJDK?
38
votes
5answers
13k views

Installing Java Automatically (With Silent Option)

I'm trying to install Java through apt-get. I found this PPA of Java Installers, however, when I add the repository, update and then issue the apt-get install -y command, the installer for java ...
36
votes
6answers
12k views

How can I remove duplicate icons for “launched” java programs in the launcher?

When launching java programs (like IntelliJ IDEA and Crashplan) in Natty's Unity launcher, duplicate icons are shown (see image). For IntelliJ I created the .desktop file, for Crashplan the .desktop ...
34
votes
2answers
179k views

How to set default Java version?

I have followed all the instructions stated at this question, but am encountering some problems with the last part of it. I actually have version 6.22 of java and would like to update to version ...
34
votes
1answer
6k views

phpStorm losing keyboard input

Every now and again phpStorm will lose input from my keyboard. I can still click around, but it will not register any keys. Other windows are fine. It takes a phpStorm restart to bring them back. It ...
33
votes
4answers
140k views

How can I tell what version of Java I have installed?

I want to start toying around with java (eventually getting to the point where I can write basic little programs for android or web), but I've managed to have java messed up on my computer (from past ...
33
votes
7answers
58k views

'tools.jar' is not in IDEA classpath

I am a new user of Linux, it has been recommended to me by my friend. He told me to install software called IntelliJ Idea IDE. Well I have been following the tutorial. But now when I try to open ...
33
votes
2answers
23k views

“sha256sum mismatch jdk-7u3-linux-x64.tar.gz ” error when trying to install Oracle Java

i recently tried installed java 7 on ubuntu 12.04 and i think i screwed something up I followed the instructions given here. First you need to remove openjdk for this run the following command from ...
32
votes
3answers
57k views

Setting JDK 7 as default

four@twenty:~$ file /etc/alternatives/java /etc/alternatives/javac /etc/alternatives/java:symbolic link to `/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java' /etc/alternatives/javac:symbolic link to ...
32
votes
4answers
63k views

How to replace OpenJDK 6 with OpenJDK 7?

Surprisingly (as OpenJDK 7 was released to general availability about 4 months ago) Ubuntu 11.10 still uses OpenJDK 6 instead of 7 by default. How do I best fix this? I'd prefer to remove OpenJDK 6 ...
31
votes
12answers
100k views

How can I install Minecraft?

I have tried many tutorials but none of them are clear enough. I have also tried installing it using Wine but it won't update and Wine goes gray and stops working. Does anybody know an easy way to ...
31
votes
2answers
36k views

Is there a way to update all Java related alternatives?

Is there a way to quickly switch over all the Java related alternatives using update-alternatives? For instance, if want to switch Java over to 7, I run sudo update-alternatives --config java and ...
29
votes
3answers
22k views

Gradle in Ubuntu

It appears that Ubuntu doesn't have new versions of Gradle in their repositories for some reason. I need it for a project that will be build by Launchpad. What should I do about this?
27
votes
4answers
83k views

Installing Java 7 Update 25 on 12.04 LTS?

How can I install Java on Ubuntu 12.04? I have: Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
26
votes
2answers
144k views

How to install the Java plugin for Firefox?

I am trying to install Java and plugins for Firefox. I installed both the JDK and JRE. When I try with the sudo update-alternatives --config java command it shows only one choice available. Plugins ...
24
votes
4answers
133k views

How can I execute a .jar file from the terminal

I know that to execute a file, I use the . command, then the file name with a space between them. But I'm trying to execute a .jar file using the . and it does not work. I went into the properties and ...
23
votes
4answers
41k views

Specify JDK for tomcat7

I have installed tomcat7 (using apt-get install) and whenever I want to start tomcat7 it says : * no JDK found - please set JAVA_HOME I have set JAVA_HOME in my bash.bashrc and also in ~/.bashrc ...
22
votes
1answer
33k views

java plugin in Chromium

Icedtea-7-plugin installed but it does not appears in the list in about:plugins in Chromium. Not able to execute java applets. Tried installing Icedtea-7-plugin but in vain. Using openjdk7 in 14.04
21
votes
3answers
24k views

Eclipse (ADT) crash Failed to write core dump. Core dumps have been disabled

i found my problem here: how to fix “Failed to write core dump. Core dumps have been disabled” error while running java and here: Eclipse crashing on startup and here: Eclipse continue crash Nothing ...
21
votes
0answers
4k views

How can I install the latest version of Sun Java (JRE)? [duplicate]

Possible Duplicate: How can I install Oracle Java JRE 7? Is there a reliable method to install the current version of Sun Java? Update 18 is in the repos, but it looks like Sun is up to ...
20
votes
2answers
14k views

How can I get a java apps to use the GTK+ theme?

Is there a way to get java apps to use my gtk theme?
19
votes
5answers
21k views

Replace openjdk with oracle-jdk on Ubuntu

I have an ubuntu system and I want to replace my openjdk with oracle-jdk. However if I remove my open-jdk and then install oracle-jdk, when I try to install some packages they want to install ...
19
votes
6answers
5k views

Java application launcher not staying in Unity launcher

I'm using IntelliJ IDEA, which is a Java application. When it runs (invoked through Dash) it shows a launcher icon with no name. I've tried several times to right-click and select "keep in ...
19
votes
3answers
28k views

Open-source, free Java Decompiler

Is there any open source Java Decompilers for Ubuntu, preferably in the repositories and/or GPL'ed? Both JAD and JD, the most popular decompilers I've found after a bit of googling, seems to be ...
18
votes
5answers
93k views

How to compile a .java file

How can I compile a .java file. What programs will I need and if I need java jdk I need help installing that. I'm very new to ubuntu so any program I need to install I will need a tutorial on how to ...
18
votes
6answers
26k views

Unsatisfied Link Error and missing .so files when starting Eclipse

I upgraded to the 12.04 beta yesterday. Now, when I try to start Eclipse, I get the splash screen and then this error message: An error has occurred. See the log file ...
16
votes
4answers
39k views

How to make a jar file run on startup & and when you log out?

I have no idea where to start looking. I've been reading about daemons and didn't understand the concept. More details : I've been writing a crawler which never stops and crawlers over RSS in the ...
16
votes
3answers
43k views

How to install openjdk-7-jdk on Ubuntu 12.04 without dragging in unrelated GUI and sound packages?

Ubuntu 12.04.2 LTS What's going on here? # apt-get install openjdk-7-jdk Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be ...
16
votes
4answers
778 views

How to prevent Java applications from creating tray icon?

With Ubuntu 13.04 the possibility to whitelist (and consequentely blacklist) certain applications from creating a tray icon is gone. Since then the tray icons of Java applications and Wine icons are ...
15
votes
4answers
57k views

How can I enable Java in Chromium?

I've got Java working on Firefox in Ubuntu 11.04 (Natty Narwhal), but using the same page on Chromium tells me Java cannot be found. How can I enable Java on Chromium in my Ubuntu 11.04?
15
votes
2answers
2k views

Why isn't Oracle Java included in the standard Ubuntu repo?

Unlike many popular programming languages, the popular Oracle Java package is only available using a PPA, not by the official repo. Why isn't Oracle Java included in the standard Ubuntu repo?
15
votes
2answers
55k views

update-java-alternatives vs update-alternatives --config java

On Ubuntu 12.04 LTS I have installed Sun's JDK7, Eclipse, and the Arduino IDE. I want the Arduino to use OpenJDK 6 and want Eclipse to use Sun's JDK 7. From my understanding I need to manually ...
14
votes
9answers
47k views

How do I make java default to a manually installed JRE/JDK?

I have Ubuntu 12.04 amd64 installed on my machine, on the previous versions of Ubuntu it was deadly easy, now there is this command update-java-alternatives with a really bad man page. I just have my ...
14
votes
3answers
57k views

apt-get install openjdk-7-jdk doesn't install javac. Why?

The program 'javac' can be found in the following packages: * openjdk-6-jdk * ecj * gcj-4.4-jdk * gcj-4.6-jdk * gcj-4.5-jdk * openjdk-7-jdk Then I run sudo apt-get install openjdk-7-jdk and ...
14
votes
1answer
22k views

OpenJDK - Oracle is better? [closed]

From http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux Type/Copy/Paste: java -version . If you're having OpenJDK Runtime Environment (IcedTea6 1.10pre) (7b15~pre1-0lucid1) OpenJDK 64-Bit ...
14
votes
5answers
11k views

Will Sun's Java be available from Canonical's partner repository?

I just discovered that Oracle's (Sun's) Java6 has vanished from the Canonical's partner repository. Before Java was taken from all repositories I had purchased Minecraft for play in Ubuntu. After ...
14
votes
2answers
16k views

Changing JVM in Java

I only recently discovered the different JVM's on the wiki page and thought I'd start tinkering. Its been difficult to find documentation on how to configure Java on Ubuntu though. Lets say I wanted ...
14
votes
4answers
53k views

How to set the JDK for Android Studio?

I can't compile a default new project for Android 2.1 because(?) the JDK used by Android Studio is JDK 1.7 but it should be JDK 1.6. To change it I go to File -> Project Structure and try to find the ...
14
votes
2answers
1k views

Horizontal scrolling treated as right click in Java applications

I've enabled horizontal scrolling for my touchpad in Ubuntu 11.04, but when using it in Java applications (NetBeans in my case) it is instead as a right click. Horizontal scrolling works perfectly in ...