0

Typing cd /usr/lib/jvm from shell I see the following:

default-java        java-1.6.0-openjdk-i386  java-6-openjdk-common
java-1.5.0-gcj-4.6  java-1.7.0-openjdk-i386  java-6-openjdk-i386
java-1.6.0-openjdk  java-6-openjdk       java-7-openjdk-i386

can someone explain what's the difference between java-1.x.. and java-x-openjdk folders?

More specifically, when I want to set default jdk in Netbeans or Eclipse, which folders should I use out of those two types?

Johan
  • 3,561
  • 9
  • 29
  • 45
  • 1
    The difference is explained here: http://stackoverflow.com/questions/22358071/differences-between-oracle-jdk-and-open-jdk-and-garbage-collection – arados Feb 29 '16 at 15:01
  • @Johan a while ago you asked about installing Java 1.8 on Ubuntu http://stackoverflow.com/questions/30177455/moving-from-jdk-1-7-to-jdk-1-8-on-ubuntu You should set up that as your default JVM to use. All the JVMs in your question are now out EOL. – Jonah Graham Feb 29 '16 at 16:42

1 Answers1

1

Although I cannot tell for sure, but I suspect that all the java-6-* are soft links to java-1.6.0-openjdk-i386. Likewise, all the java-7-* are soft links to java-1.7.0-openjdk-i386.

If you want to tell for sure, do ls -l so you can see the details of the files, including what they are links to.

If you still need Java 5, 6 and 7 (even though they are EOL) then you can add any of the paths (linked or not) to Eclipse.

As for which should be your default, install Java 8 and set that up as the default. The best way on Ubuntu is probably this way (see docs):

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Community
  • 1
  • 1
Jonah Graham
  • 7,890
  • 23
  • 55