12

2 questions.

  1. After installing the Oracle Java 7 on my new Debian local box, I opened up a terminal and executed the following command:

java -version

When I did that it states: java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

I installed the Java 7 JDK and Java 7 JRE in the following directories respectively:

/usr/lib/jvm/jdk1.7.0 /usr/lib/jvm/jre1.7.0

  1. Is there a way to remove the java-6-sun and java-6-sun-1.6.0.26 folders as well or will it hurt just to leave them there?

Any help/direction on these 2 questions would be appreciated.

Regards.

Melinda
  • 1,501
  • 5
  • 25
  • 58

2 Answers2

22

sudo update-alternatives --config java

Is the command to swap it i believe.

You can then call

which java

and it should reference the version selected.

Mike McMahon
  • 7,096
  • 3
  • 30
  • 42
3

sudo update-java-alternatives -s ... will configure all the alternatives at the same time update-java-alternatives -l lists the alternatives

Bastien Durel
  • 603
  • 5
  • 20