java versions problem
On a recent update of my Debian Stable system, which is otherwise working very well, I found following warning:
Quote:
Code:
default-jre 2:1.7-52 2:1.7-52 2:1.7-52 install How can I optimize so that I can run java programs smoothly? Thanks for your help. |
i'm sorry i don't have debian specific help, but on archlinux this helped:
https://wiki.archlinux.org/index.php...ng_between_JVM here's the archlinux-java script: Code:
#! /bin/bash |
The gcc java (gcj-*) is present because some packages depends on it.
Selecting the java version you want to use : $ sudo alternatives --config java : EDIT EDIT : # update-alternatives --config java - |
Using script program by @ondoho I found following:
Available Java environments: java-1.5.0-gcj-4.6/jre java-1.5.0-gcj-4.7/jre java-1.5.0-gcj-4.9-i386 java-6-openjdk-i386/jre java-7-openjdk-i386/jre No Java environment set as default 'alternatives' is not installed in my Debian Stable. I checked repository- there is galternatives and kalternatives. I installed kalternatives which gave a GUI program but not 'alternatives' command. The GUI program also listed all above environments, in same order as above and they are in increasing order of priority. The java-7-openjdk has highest priority and is also checked on GUI program. How can I just keep only gcj-4.9 and java-7-openjdk? Can I just uninstall others? |
These "alternatives" files are installed with the package 'dpkg' :
( You can't have a Debian OS with no dpkg ) /etc/alternatives/README ( Please read ) /usr/bin/update-alternatives /usr/sbin/update-alternatives https://packages.debian.org/jessie/amd64/dpkg/filelist The right "java select" command is : # update-alternatives --config java Sorry. - |
Will update-alternatives set the default only or remove others? I want to keep latest gcj and latest openjdk with openjdk as default. Can I use apt-get purge command for others?
|
update-alternatives will not remove software.
you can try to purge the other versions, but it's possible that some other software still depends on it and complains in the process. so unless you just blindly press Enter on everything, you can try that purge. since this is java, it is also possible that some other software that is not installed through debian's packet management depends on some particular version. in that case you wouldn't get a warning. but you should know if you use software like that. |
See post #5 : /etc/alternatives/README :
"Please read the update-alternatives(8) man page for information on this directory and its contents." $ man 8 update-alternatives - |
I purged all older versions and now following shows up on my system:
Code:
$ update-alternatives --config java Currently purging older versions has not caused any problems but I will know in the future. Very related to this is icedtea and I have following on my system: Code:
icedtea-netx-common 1.5-2+deb8u1 1.5-2+deb8u1 1.5-2+deb8u1 install |
Re #9.
The "open source" java is { icedtea-* + java-7-openjdk }. `icedtea-*' cannot be removed, if you want to keep java-7-openjdk. |
What is icedtea-7-jre-jamvm and when is it needed?
|
Quote:
|
Solve the first issue in this thread
Somehow this thread became "threaded". The original issue was the warning
update-binfmts: warning: current package is openjdk-7, but binary format already installed by openjdk-6. That binary format can be removed by the very same notifier package by issuing the command line: sudo update-binfmts --package openjdk-6 --remove jar /usr/bin/jexec as stated in a Ğaskubuntuğ question 259096 by Raul. I test it and worked. |
All times are GMT -5. The time now is 04:43 AM. |