Skip to main content

Questions tagged [java]

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 on StackOverflow.com.

Filter by
Sorted by
Tagged with
577 votes
28 answers
923k 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 ...
Benjamin's user avatar
  • 10.2k
396 votes
4 answers
1.5m 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?
Gaurav Agarwal's user avatar
324 votes
12 answers
995k views

How to install OpenJDK 8 on 14.04 LTS?

Java 8 is now available according to http://openjdk.java.net/projects/jdk8/, but http://openjdk.java.net/install/ does not yet mention how to install OpenJDK 8 (not Oracle Java) on Ubuntu 14.04 Long ...
Thorbjørn Ravn Andersen's user avatar
249 votes
0 answers
339k 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/?
user22744's user avatar
  • 2,501
207 votes
1 answer
613k 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 ...
Dan's user avatar
  • 3,418
204 votes
9 answers
1.0m 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.
CaldwellYSR's user avatar
  • 2,207
199 votes
9 answers
1.3m 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 Java .jar file using the . and it does not work. I went into the ...
jaorizabal's user avatar
  • 3,758
191 votes
8 answers
849k 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 ...
Matteo's user avatar
  • 2,307
190 votes
7 answers
621k views

Switch between multiple java versions

While installing Android Studio on Ubuntu 14.04 I get the message that my Java version (javac 1.7.0_79) is causing problems. I found a solution of how to install a newer Oracle version of Java: sudo ...
mcExchange's user avatar
  • 3,178
186 votes
15 answers
480k views

How do I install Java?

How do I install Java, including in my browser, so websites with Java work?
164 votes
4 answers
620k 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 ...
Stan Smith's user avatar
  • 1,743
134 votes
8 answers
405k views

How do I install openjdk 7 on Ubuntu 16.04 or higher?

I would like to upgrade my main system to 16.04, but I work on projects that require OpenJDK 7. Apparently it is not available from a trivial apt-get install openjdk-7-jdk. Only versions 8 and 9 are ...
onairda's user avatar
  • 3,045
124 votes
6 answers
1.0m views

How to compile a .java file on Ubuntu?

How can I compile a .java file? What programs will I need? If I need the Java JDK I will also need help installing that. I'm very new to Ubuntu, so any program that I need to install I will need a ...
user65407's user avatar
  • 1,375
110 votes
7 answers
117k views

Assistive technology not found AWTError

$ java -jar aprof-plot.jar Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit....
Shiwangi Singh's user avatar
107 votes
10 answers
320k 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?
Praveen Sripati's user avatar
104 votes
7 answers
70k 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 ...
Layke's user avatar
  • 1,379
104 votes
4 answers
464k 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 ...
Stramato's user avatar
  • 1,467
91 votes
10 answers
477k views

How to find my current JAVA_HOME in ubuntu?

How to find my current JAVA_HOME in ubuntu? I have to set java_home path when installing maven.
Samitha Chathuranga's user avatar
85 votes
4 answers
200k 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 `/...
Wingsuit's user avatar
  • 969
74 votes
6 answers
377k 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 ...
user199273's user avatar
72 votes
14 answers
211k 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 ...
user827992's user avatar
  • 2,881
72 votes
2 answers
21k views

Why is OpenJDK 10 packaged as openjdk-11-*?

While looking to compile OpenJDK from source, the newest General Availability version (OpenJDK 10.0.1) insists on OpenJDK 9 or 10. JDK 11, however, is not due to be released until September 2018. ...
tudor -Reinstate Monica-'s user avatar
64 votes
5 answers
52k views

Gradle in Ubuntu for Launchpad

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?
Marlinc's user avatar
  • 781
62 votes
7 answers
407k views

How to uninstall OpenJDK?

I don't want OpenJDK installed on my Ubuntu 13.04 system, but trying to uninstall the openjdk-7-jre yields the following message: $ sudo apt-get purge openjdk-7-jre Reading package lists... Done ...
Sandra's user avatar
  • 723
62 votes
2 answers
156k 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 ...
HarlemSquirrel's user avatar
61 votes
3 answers
293k views

Oracle-Java8-Installer: No installation candidate

I'm trying to install Oracle Java 8 on my Ubuntu Server (16.04 LTS, fully updated, x64), following this (very simple) guide. After running apt-get update, I get the standard list of sites having been ...
Jake's user avatar
  • 713
59 votes
4 answers
109k 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 ...
littleali's user avatar
  • 717
59 votes
1 answer
165k views

How do I update Oracle Java (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, ...
pilat's user avatar
  • 693
58 votes
14 answers
28k views

Android Studio update issue with jre/bin/java

While updating Android Studio I got the following error. The patch was downloaded and extracted, but there was some conflict with jre/bin/java Access denied. The error message is shown in the below ...
Utkarsh's user avatar
  • 681
58 votes
4 answers
74k 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 ...
James McMahon's user avatar
58 votes
5 answers
21k 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 ...
neolaser's user avatar
  • 691
54 votes
7 answers
226k 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 ...
kyleskool's user avatar
  • 641
53 votes
7 answers
369k views

How to upgrade Java on Ubuntu?

I installed Ubuntu on my computer, and now my Java version is not updated. I have Java, so I don't need to install - just update the current version. Can someone please tell me the command I have to ...
kenneth's user avatar
  • 607
50 votes
1 answer
173k views

Downgrading Java 11 to java 8? [duplicate]

How can i downgrade the java version 11 to java 8. As i need jenkins, current jenkins versoin doesn't support java 11. I need to downgrade.
Rajesh Ganessan's user avatar
49 votes
10 answers
201k 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 ...
Ivan's user avatar
  • 57.5k
48 votes
4 answers
236k views

How to find path to java?

I needed to update my openJDK to 8 version... And I downloaded the new one this way: sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-8-jdk sudo update-...
Sirop4ik's user avatar
  • 849
48 votes
9 answers
114k 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 "...
Patrick's user avatar
  • 481
47 votes
8 answers
333k 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 ...
Lucio's user avatar
  • 18.9k
46 votes
8 answers
18k 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 ...
Tim's user avatar
  • 563
42 votes
5 answers
95k 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 and ...
Hossein's user avatar
  • 1,737
41 votes
6 answers
211k views

Setup and install IntelliJ with JDK

Is there any scripts for downloading and installing IntelliJ with JavaJDK or OpenJDK? I don't know how I did it before using Ubuntu 12.10 but I'm now on a fresh 13.04 install and I have been looking ...
spences10's user avatar
  • 2,592
39 votes
3 answers
44k 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?
RolandiXor's user avatar
  • 51.2k
38 votes
2 answers
37k 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 ...
Fawkes5's user avatar
  • 2,499
36 votes
4 answers
74k 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 ...
rubo77's user avatar
  • 32.8k
35 votes
1 answer
62k views

How to run a .jnlp file in ubuntu server

I am trying to run a .jnlp (java) file in Ubuntu Server. This file is BitCoin minter. When I try to run it, it says access is denied.
James Martin's user avatar
33 votes
12 answers
110k 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 ...
jnut's user avatar
  • 2,794
33 votes
4 answers
78k 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 ...
Ivan's user avatar
  • 57.5k
33 votes
4 answers
89k views

How can I uninstall oracle java 8 and install oracle java 7 instead with webupd8 installer?

I installed oracle java 8 by typing in terminal: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer but now I want to uninstall oracle ...
Eikonikos Eikon's user avatar
32 votes
4 answers
101k views

netbeans not all requested modules can be enabled

I know this question has already been posted, but the solutions provided don't work for me. I added the webupd8team/java repository and installed oracle-java8-installer and oracle-java8-set-default. I ...
Jonathan De Felice's user avatar
32 votes
3 answers
28k 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: */...
fadabi Nawi's user avatar

1
2 3 4 5
65