I install openjdk-7-jre.Can I unistall openjdk-6-jre

Asked by thomaz de gouveia

I installed the openjdk-7-jre, but it seems that the system is using the openjdk-6-jre (OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)). The icedtea-6-jre-cacao depends of openjdk 6-jre-headless, I didn't find the icedtea-7-jre-cacao to install.
So, I want to know if i can unistall the openjdk-6-jre, for what the JVM is used for, and if the openjdk-7-jre is active.
I installed the packages using synaptic
Very thanks for the answers.
P.S. I'm a old one but still a newbie

thomaz@thomaz-G60J:~$ uname -a; lsb_release -a; java -version
Linux thomaz-G60J 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openjdk-7 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

dpkg -l | grep java

Thanks

Revision history for this message
thomaz de gouveia (thomgou) said :
#2

Andrew,

I'm running a Gnome 3 shell, and the Unity DE is not installed
Thanks for the reply

thomaz@thomaz-G60J:~$ dpkg -l | grep java
ii ca-certificates-java 20110912ubuntu3 Common CA certificates (JKS keystore)
ii gjs 1.30.0-0ubuntu1 Mozilla-based javascript bindings for the GNOME platform
ii java-common 0.42ubuntu2 Base of all Java packages
ii libaccess-bridge-java 1.26.2-6 Java Access Bridge for GNOME
ii libaccess-bridge-java-jni 1.26.2-6 Java Access Bridge for GNOME (jni bindings)
ii libgjs0c 1.30.0-0ubuntu1 Mozilla-based javascript bindings for the GNOME platform
ii libhsqldb-java 1.8.0.10-9ubuntu1 Java SQL database engine
ii libjaxp1.3-java 1.3.05-1ubuntu1 Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)
ii libmozjs185-1.0 1.8.5-1.0.0-0ubuntu5 Spidermonkey javascript engine
ii libreoffice-java-common 1:3.4.3-3ubuntu2 office productivity suite -- arch-independent Java support files
ii libservlet2.5-java 6.0.32-5ubuntu1 Servlet 2.5 and JSP 2.1 Java API classes
ii libxerces2-java 2.9.1-4.1ubuntu3 Validating XML parser for Java with DOM level 3 support
ii plasma-scriptengine-javascript 4:4.7.1-0ubuntu5 JavaScript script engine for Plasma
ii tzdata-java 2011l-0ubuntu0.11.10 time zone and daylight-saving time data for use by java runtimes

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Unity isn't a DE, It's a shell, just like Gnome shell. Both Gnome shell and Unity run on the Gnome DE.

How did you install openjdk-7-jre?

Revision history for this message
thomaz de gouveia (thomgou) said :
#4

Thanks for the explanation. I misused the names but i know what Unity and Gnome shell are, you know, newbies are prone to mistakes :P

I installed it from Synaptic package manager, i just marked the package openjdk-7-jre and hit apply button.
It is strange, Synaptic don't show the installed files, it says "The list of installed files is only available for installed packages", but shows it for the openjdk-6-jre. Both packages are marked as installed
I looked at the usr/lib/jvm and it is there
thomaz@thomaz-G60J:/usr/lib/jvm$ ls
java-1.5.0-gcj java-1.7.0-openjdk-amd64 java-7-openjdk-common
java-1.5.0-gcj-4.6 java-6-openjdk java-gcj
java-1.6.0-openjdk java-7-openjdk-amd64 java-gcj-4.6

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Does:

sudo update-alternatives --config java

Show the 1.7 as an option?

Revision history for this message
thomaz de gouveia (thomgou) said :
#6

Yes, that thing is installed but not configured, as I know I need to just hit "3" and enter. Am I right?

thomaz@thomaz-G60J:~$ sudo update-alternatives --config java
[sudo] password for thomaz:
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
  1 /usr/bin/gij-4.6 1046 manual mode
  2 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
  3 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1051 manual mode

Press enter to keep the current choice[*], or type selection number:

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

Yes, that will set the java to the open java 7

Revision history for this message
thomaz de gouveia (thomgou) said :
#8

Thanks,
The new path for the java is set and working :-)

Can you help with this problem?

Provide an answer of your own, or ask thomaz de gouveia for more information if necessary.

To post a message you must log in.