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.

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

3245 questions
577
votes
28 answers

How can I install Sun/Oracle's proprietary Java JDK 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 7, I followed this way to install Java 6. But it…
Benjamin
  • 10,229
401
votes
4 answers

How to set JAVA_HOME for Java?

I've installed a version of Java. How can we set the $JAVA_HOME environment variable correctly?
324
votes
12 answers

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 Term Support. (For 14.10 and later just run…
249
votes
0 answers

How do I install Oracle Java JDK 7?

If I downloaded the latest JDK from Oracle, do I just download the .tar file and extract it to /usr/lib/jvm/?
user22744
  • 2,501
207
votes
1 answer

How to install Oracle Java on Ubuntu 14.04?

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 recognize it. Can any one please help me with some…
Dan
  • 3,418
206
votes
7 answers

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 apt-add-repository ppa:webupd8team/java sudo…
mcExchange
  • 3,398
205
votes
9 answers

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
  • 2,217
200
votes
9 answers

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 properties and marked it as executable and made it run…
jaorizabal
  • 3,778
196
votes
8 answers

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 after moving the extracted directory java-6-oracle…
Matteo
  • 2,357
187
votes
15 answers

How do I install Java?

How do I install Java, including in my browser, so websites with Java work?
Jay
  • 1,025
168
votes
4 answers

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 choose which Java to use before running each…
Stan Smith
  • 1,783
135
votes
8 answers

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 listed in the repository. Can anyone point me to…
onairda
  • 3,055
125
votes
6 answers

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 tutorial on how to install them.
user65407
  • 1,385
  • 4
  • 11
  • 8
110
votes
7 answers

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.java:807) at…
107
votes
10 answers

How do I install Oracle JDK 6?

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?
1
2 3
99 100