Questions tagged [jdk]

Questions relating to the installing and use of the Java Development Kit (jdk)

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
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
184 votes
6 answers
593k 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,118
107 votes
10 answers
319k 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
4 answers
460k 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
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
84 votes
3 answers
36k views

How to install JDK sources?

How can I download the source code of Java on my local machine, so I can reference it in an IDE?
AlikElzin-kilaka's user avatar
71 votes
14 answers
210k 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,851
59 votes
4 answers
55k views

How to update from webupd8 team PPA (Oracle JDK 8/9) that got inconsistent with its GPG key?

A few days ago, I started getting the following error when performing apt-get update: E: Repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease' changed its 'Label' value from ...
mfg's user avatar
  • 1,277
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
332k 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
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,707
41 votes
6 answers
209k 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
35 votes
3 answers
186k views

How to remove Oracle JDK

I didn't find any related articles about How to remove Oracle JDK. There are some related articles but they didn't solve the problem. I installed Oracle JDK tarball file from Oracle site by following ...
obysr's user avatar
  • 780
33 votes
1 answer
59k views

installed jdk by and have Error: Could not create the Java Virtual Machine

I am getting my new laptop going and went to install the latest oracle JDK 7u25. I followed the instructions on this site to do it. Afterwards when I type java --version in the terminal I get the ...
John's user avatar
  • 691
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
30 votes
3 answers
86k views

How can I install OpenJDK on Ubuntu 16.04? [duplicate]

Since I upgraded to the latest version of Ubuntu, I cannot install the Java OpenJDK package needed to compile Android custom ROMs. When I run sudo apt-get install openjdk-7-jdk, the following error ...
Hakam El Assouad's user avatar
24 votes
3 answers
147k views

How do I uninstall Java 11 to be able to install Java 8 for Android Studio?

I tried to install Android Studio but it gave me several problems. Among them is that they told me that it need Java 8 while on my PC Java 11 is installed. When I run java -version, the result is the ...
Miguel Espeso's user avatar
24 votes
5 answers
27k views

How to install the OpenJDK 8 (Ubuntu 19.04)?

Only openjdk-11-jdk and newer seem to be available. Is there any way to install the OpenJDK 8? Preferably without adding a PPA.
FliegendeWurst's user avatar
24 votes
5 answers
91k views

JavaFX missing, Ubuntu 18.04

I have Java 8 and Ubuntu 18.04. I'm using NetBeans and when tried to make some program, it couldn't be done because JavaFX is missing. I installed Java JDK with NetBeans from Oracle's site and ...
maria's user avatar
  • 915
23 votes
2 answers
11k views

java-8-oracle (1.8.0_66) problem with PrintAssembly "Could not load hsdis-amd64.so"

I'm trying to run my programs with -XX:+PrintAssembly options but I always get message like: Java HotSpot(TM) 64-Bit Server VM warning: PrintAssembly is enabled; turning on DebugNonSafepoints to ...
Piotr Tarnowski's user avatar
22 votes
3 answers
69k 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 "...
Andrei Botalov's user avatar
18 votes
1 answer
90k views

how to install java 8 in ubuntu 16.04? [duplicate]

How to install java-JDK 8 & maven in Ubuntu 16.04 without adding any PPA?
Thirumal's user avatar
  • 989
18 votes
1 answer
81k views

Where is the Oracle java jdk keystore located?

Installed Oracle Java with the webupd8 ppa and need to tweak some policy settings (access to clipboard specifically) webUpd8 plug: http://www.webupd8.org/2011/09/how-to-install-oracle-java-7-jdk-in....
Alvin's user avatar
  • 710
18 votes
2 answers
36k 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 ...
OVERTONE's user avatar
  • 2,307
18 votes
2 answers
22k views

Java 11 to 8: update-alternatives: error: no alternatives for mozilla-javaplugin.so

I have Java 11 and 8 in my Ubuntu 18.04, side by side. I mean to set Java 8 as the default. What I get: $ sudo update-java-alternatives --set /usr/lib/jvm/java-1.8.0-openjdk-amd64 update-...
sancho.s ReinstateMonicaCellio's user avatar
17 votes
4 answers
19k views

Can't install Oracle JDK 9

I uninstalled jdk packages and now can't install them back. I managed to install oracle-java7-installer and oracle-java8-installer but can't install oracle-java9-installer. It seems that my computer ...
Akseli Arvaja's user avatar
16 votes
1 answer
93k views

How can I install jdk-8u91-linux-x64.tar.gz on Ubuntu? [duplicate]

I downloaded jdk-8u91-linux-x64.tar.gz from the Oracle website. How can I install jdk-8u91-linux-x64.tar.gz? I have tried apt-get install jdk-8u91-linux-x64.tar.gz and also sudo add-apt-repository ...
A.J's user avatar
  • 171
16 votes
2 answers
50k views

Get error when install Oracle JDK 8 on Ubuntu 18.04 [duplicate]

I am trying install Oracle Java 8 on Ubuntu 18.04 LTS. $ java --version Command 'java' not found, but can be installed with: sudo apt install default-jre sudo apt install openjdk-11-jre-...
Cyrus the Great's user avatar
16 votes
5 answers
35k views

Error installing oracle-java8-installer from webup8team ppa

Does anyone know how to fix this? First I did: sudo add-apt-repository ppa:webupd8team/java Then I did: sudo apt-get update And then: $ sudo apt-get install oracle-java8-installer Reading ...
blaster2429's user avatar
16 votes
1 answer
10k views

Ugly/Non Anti-Aliased fonts in Java-Swing Applications

I've recently switched to Ubuntu and I've installed Oracle's Java JDK 8u45 (32 bit) using the webupd8team/java repository. Everything seems to be working fine except that the Java-Swing applications ...
hexman's user avatar
  • 881
16 votes
1 answer
95k views

gzip: stdin: unexpected end of file -> problem in extracting jdk-7u55-linux-x64.tar.gz

I have downloaded 'jdk-7u55-linux-x64.tar.gz' When I execute following command to extract, sudo tar xvzf jdk-7u55-linux-x64.tar.gz also tried, sudo tar xvf jdk-7u55-linux-x64.tar.gz sudo tar xf ...
A J's user avatar
  • 11.4k
16 votes
3 answers
51k views

Netbeans install error: The specified jdk folder does not contain jdk

During installation of Netbeans 7.3 I got this message the specified jdk folder does not contain jdk I have openjdk 7 installed on my system using apt-get. I tried to specify the path to /usr/lib/...
Nabil's user avatar
  • 2,142
16 votes
3 answers
59k 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 ...
Dr.Haribo's user avatar
  • 263
15 votes
3 answers
72k views

IcedTea plugin for OpenJDK 8

I updated from OpenJDK 7 to 8. I uninstalled 7, which uninstalled the IcedTea plugin as well. I tried to reinstall IcedTea with sudo apt-get install icedtea-7-plugin But it doesn't work. When I ...
Srikanth R's user avatar
15 votes
1 answer
72k views

"Please ensure you have JAVA_HOME points to JDK rather than JRE" message

I have java installed aaa@ubuntu:~$ whereis java java: /usr/bin/java /usr/bin/X11/java /usr/local/java /usr/share/java aaa@ubuntu:~$ whereis javac javac: /usr/bin/javac /usr/bin/X11/javac and etc/...
Alex Malex's user avatar
  • 2,632
14 votes
5 answers
121k views

bash: /usr/bin/java: No such file or directory

I have installed jdk1.8.0 manually from the oracle website. I have followed the steps here on Digital Ocean. When I executed java -version I got this result:- bash: /usr/bin/java: No such file or ...
Adla Sutej's user avatar
14 votes
1 answer
35k views

How to install JDK 19 on Ubuntu 22.04 LTS?

Today, oracle release JDK 19. How to install JDK 19 on Ubuntu 22.04 LTS? https://www.oracle.com/java/technologies/downloads/
Vy Do's user avatar
  • 509
14 votes
3 answers
39k views

Java can't find cacerts

I've been trying to setup a java dev environment with no luck. I installed openjdk-8-jdk but I keep getting java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-...
Ava's user avatar
  • 771
14 votes
1 answer
23k views

Which Java package should I use: OpenJDK or Oracle JDK?

I'm new to Java development under Ubuntu. When I typed javac in the terminal, it prompted me to install OpenJDK and a bunch of other JDKs. I want to know if there is any difference between OpenJDK 7 ...
tonga's user avatar
  • 1,287
13 votes
3 answers
67k views

How can i install jdk7 on ubuntu 18.04 lts 64bit? [duplicate]

I upgrade my system to ubuntu 18.04 lts, but I work on projects that require JDK 7. How can i install jdk7 on ubuntu 18.04 lts 64bit?
sana's user avatar
  • 633
13 votes
2 answers
19k views

How can I install the latest jdk 9 using terminal command on ubuntu 16.04 LTS ?

I have jdk 8 on my ubuntu desktop. I need to install the latest jdk 9 for Java programming. What are the commands for Java programming and IDE such as Netbeans or Eclipse?
Md. Omar Hasan's user avatar
13 votes
2 answers
18k views

OpenJDK vs. Oracle JDK for Android Studio

When I run Android Studio with OpenJDK installed I get a warning recommending the use of Oracle JDK. Is Oracle JDK actually better or is it fine to just stick with OpenJDK? Installing Oracle JDK seems ...
js sol's user avatar
  • 173
12 votes
3 answers
56k views

Unable to set JDK path in IntelliJ IDEA

I am trying to get started with IntelliJ IDEA, however I am not able to set the JDK path. which java returns /usr/bin/java, however IDEA is not able to find the specified path. Expanding bin in the ...
Anuraag Baishya's user avatar
11 votes
3 answers
47k views

update-alternatives: "alternative path doesn't exist" issue while updating JDK7

I decided to update my JDK7 to recent version from here. Corresponding x64 tag.gz archive for my architecture has been downloaded and extracted to /usr/lib/jvm as usual. All previous versions of Java ...
ezze's user avatar
  • 800
10 votes
1 answer
68k views

How to uninstall Oracle JDK in Ubuntu 16.04 LTS [duplicate]

I installed Oracle JDK on Ubuntu 16.04 LTS using the following commands: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer But I tried ...
JackSlayer94's user avatar
10 votes
4 answers
65k views

"Oracle JDK 7 Is NOT installed" error?

I'm trying to install JDK7 on ubuntu 12.4. In the first try, the power has gone and the laptop shutdown in the middle of downloading JDK7 using terminal as I was using the next terminal commands ...
Salahuddin's user avatar
  • 4,811
10 votes
3 answers
52k views

How to set JAVA_HOME to point to a JDK installation?

I installed sun-java6-jdk. I need to find its home directory. JAVA_HOME must point to a JDK installation, not JRE.
Lesya Makhova's user avatar
10 votes
1 answer
64k views

How to set new JDK home in NetBeans IDE after Java update (NetBeans IDE refuses to start)

This is a question which will help you through what to once you have realised that after updating your Java version, NetBeans IDE refuses to launch. And even after updating your $PATH variable in your ...
user avatar
10 votes
1 answer
22k views

Removing Oracle JDK and re-configuring update-alternatives

Please check the scenario below: sudo update-alternatives --config java There are 5 choices for the alternative java (providing /usr/bin/java). Selection Path ...
Codistan's user avatar
  • 213

1
2 3 4 5
12