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

437
votes
25answers
697k 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 ...
130
votes
13answers
296k views

How do I install Java?

How do I install Java, including in my browser, so websites with Java work?
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/?
33
votes
12answers
103k 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 ...
95
votes
10answers
245k 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?
78
votes
9answers
254k 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.
59
votes
2answers
144k 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 ...
125
votes
1answer
392k 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 ...
19
votes
6answers
28k 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 /home/gabriel/.eclipse/org....
8
votes
2answers
3k views

How to start a GUI application from cron?

I need to run a Java applet from a Firefox. The problem is, I need to run this Firefox from a cron. If I run from the command line and its work fine, but when put the command in the cron it failed: */...
16
votes
4answers
100k views

How run a .jar file with a double-click?

I have a problem running .jar files by double-clicking them. When I go to the Properties dialogue I can't find Java--only Archive Manager in the list of programs. But java -jar somefile.jar opens the ...
149
votes
11answers
358k views

How to install OpenJDK 8 on 14.04 LTS?

As of 2016-04-23 Ubuntu 16.04 has ben released, with both OpenJDK 8 and 9 in the official repositories. I would recommend upgrading to that. As of 2016-01-11 OpenJDK 8 is still not available in an ...
37
votes
7answers
14k 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 ...
33
votes
6answers
199k 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 ...
1
vote
1answer
5k views

Installing Eclipse IDEs for Java and C/C++

I'm running an Ubuntu 14.04 and want to install the Eclipse IDE for both Java and C/C++ programming. I installed the separate installation files from their official website. I followed this thread ...
34
votes
2answers
25k 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 ...
1
vote
2answers
6k views

Cannot remove JDK – /usr/sbin/alternatives: No such file or directory

When I try to remove Java with sudo apt-get remove jdk1.8.0-40 I get this: Reading package lists... Done Building dependency tree Reading state information... Done The following packages ...
53
votes
3answers
272k views

How to set default Java version?

I 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 6.30. So ...
24
votes
9answers
76k 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 ...
46
votes
7answers
190k 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 ...
12
votes
2answers
16k views

Fix scaling of java-based applications for a high DPI screen

There are some applications (mainly java based) that don't follow the global 2x scale I set in the screen-settings. So these apps are really tiny on my high DPI screen with 3200x1800px. How can I get ...
7
votes
1answer
11k views

How do I reenable opening jar files by double clicking on them?

How can I make "double click to run" the default behaviour of a jar-file on Nautilus? There is no "Open with OpenJDK Java 7 Runtime" on the "Open with" tab under Properties.
3
votes
1answer
1k views

OpenJDK not working

I have run sudo apt-get install openjdk-7-jre It says Reading package lists... Done Building dependency tree Reading state information... Done openjdk-7-jre is already the newest version....
51
votes
1answer
138k 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, ...
22
votes
3answers
18k 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?
16
votes
2answers
19k 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 ...
13
votes
9answers
30k views

Minecraft in jdk 1.7.0_u2 x64

I have Ubuntu 11.10 64-bit and I installed JDK 1.7.0 update 2 x64 via webupd8 page. But currently I have problem with minecraft game. After downloading launcher from Minecraft.net and lauch the game ...
15
votes
3answers
34k views

“No such file or directory” when invoking java

I'm trying to re-install Oracle JDK 7 32 bit to 64 bit Ubuntu (previously 64 bit JDK was installed). JDK is currently present at /usr/lib/jvm/jdk1.7.0. I invoke sudo update-alternatives --remove "...
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 ...
8
votes
2answers
24k views

How to run a Java program in Ubuntu in the following situations

sachin@sachin-Lenovo-G550:~$ java -version java version “1.7.0_21″ OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1) OpenJDK Server VM (build 23.7-b01, mixed mode) When I ran the ...
2
votes
1answer
310 views

Can't Install anytime in Ubuntu

I am trying to install java in ubuntu but it is giving me this error: somewhere@someome-OptiPlex-755:/$ sudo apt-get install default-jre Reading package lists... Done Building dependency tree ...
72
votes
3answers
223k views

How to set JAVA_HOME for Java?

I've installed a version of Java. How can we set the $JAVA_HOME environment variable correctly?
30
votes
2answers
106k 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 ...
24
votes
1answer
38k 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
10
votes
4answers
13k views

Minecraft with OpenJDK 7, I get “the trustAnchors parameter must be non-empty”

Im using Ubuntu 15.04 and OpenJDK 7, trying to run Minecraft. This is what I get. EDIT: Minecraft is working now when I use sudo java -jar Minecraft.jar but doesn't work without super user, how would ...
4
votes
4answers
17k views

Running 32-bit Firefox with sun-jre in 64-bit Ubuntu [duplicate]

I am trying to run juniper networks connect program to vpn into work and it only works on 32bit sun jre. All the things I have found with google failed so far. I can't use any scripts, like ...
2
votes
1answer
1k views

Oracle java7 config

I've installed Oracle Java 7 according to this guide. When I run sudo update-java-alternatives -s java-7-oracle, it gives me : update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin....
5
votes
1answer
4k views

Eclipse not using PATH

I am facing an issue of Eclipse not picking up the VM from the PATH environment variable. I follow the below steps to reproduce the error: Downloaded the appropriate version of Oracle's JDK from ...
6
votes
3answers
2k views

How to revert back to OpenJDK?

I had installed sun-java, but I want to revert back to OpenJDK 7. I was trying to re-install from the terminal using the command sudo apt-get install openjdk-7-jre, same from Synaptic and Software ...
1
vote
1answer
2k views

IcedTea plugin not working in Midori web browser

I have Lubuntu 13.04, and I use the Midori WebBrowser. I initially had a problem with the plugins, but later on, I could activate Flash and Java. I use the IcedTea browser plugin to view Java content. ...
1
vote
1answer
134 views

OpenForis Calc / embedded Tomcat won't start

Trying to run OpenForis Calc, embedded Tomcat instance fails. Error seems to appear here: Apr 17, 2015 2:13:47 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying ...
1
vote
1answer
2k views

JDK x64 fails to unpack in Ubuntu 13.04

New to ubuntu, I have just installed the OS in my VMPlayer. I am trying to install Oracle (Sun) Java 6 onto my Ubuntu 13. As per the instruction given here I download jdk-6u45-linux-x64.bin from the ...
54
votes
5answers
23k 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 ...
46
votes
3answers
217k 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 ...
34
votes
4answers
72k 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 ...
12
votes
3answers
50k views

How set CLASSPATH variable for a folder in Ubuntu

I know that export CLASSPATH=/usr/local/java/tools.jar:$CLASSPATH will add tools.jar to the CLASSPATH, but i want to set folder to the CLASSPATH like this export CLASSPATH=/usr/local/java/lib/:$...
9
votes
8answers
27k views

Java JRE will not install due to “tar: Error is not recoverable” error

I have been trying to get Java for the past day now. I followed several tutorials but I keep getting the same error. After I put in tar -xvf jre-7u4-linux-i586.tar.gz it says Cannot open: No such file ...
2
votes
5answers
5k views

Convert .jar to executable

My project is to develope an installer which is an executable for all three platforms Windows, Mac and Ubuntu.As you know the executables on Windows, Mac and Ubuntu are .exe, .app and .deb ...
12
votes
2answers
33k views

Minecraft jar not marked as executable

I looked up several tutorials on how to install and they dont work. I do everything correctly but then i get this: The file '/home/mike/Downloads/minecraft.jar' is not marked as executable. ...
6
votes
0answers
10k views

How to install Oracle Java web plugin on Chrome in 12.04? [duplicate]

Possible Duplicate: How can I install Sun/Oracle’s proprietary Java 6/7 JRE or JDK? I've tried a whole lot of guides, but at best I ended up with neither Google Chrome not Firefox registering ...