From: Camaleón on
On Fri, 13 Aug 2010 18:45:54 +0200, Merciadri Luca wrote:

> Some months ago, I installed a Sun VM and SDK (I think this is so): jdk
> 1.6.0-12. I think that it was a .bin, and it resulted in the whole being
> installed at /usr/lib/jvm/java-6-sun/sun-java6-6-12/jdk1.6.0_12. The
> problem is that it looks like unrecognized by update-alternatives:
>
> # update-alternatives --config java
> There are 2 alternatives which provide `java'.
>
> Selection Alternative
> -----------------------------------------------
> 1 /usr/bin/gij-4.3
> *+ 2 /usr/lib/jvm/java-gcj/jre/bin/java
>
>
> Why?

I think because you installed the package from outside Debian repos and
so it got not recognized inside the whole package database.

***
ls -l /etc/alternatives | grep "java-6-sun"
***

If it's not there, I guess it won't be detected/managed by "update-
alternatives" :-?

> What can I do to make it recognized?

Hmmm, by creating a symbolic link in the above dir? But maybe not the
better way, though. I would read "man update-alternatives" to find out.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.08.13.17.15.05(a)gmail.com
From: Merciadri Luca on
Camaleón wrote:
> On Fri, 13 Aug 2010 18:45:54 +0200, Merciadri Luca wrote:
>
>
>
> I think because you installed the package from outside Debian repos and
> so it got not recognized inside the whole package database.
>
> ***
> ls -l /etc/alternatives | grep "java-6-sun"
> ***
>
> If it's not there, I guess it won't be detected/managed by "update-
> alternatives" :-?
>
>
>
> Hmmm, by creating a symbolic link in the above dir? But maybe not the
> better way, though. I would read "man update-alternatives" to find out.
>
It's there:

==
# ls -l /etc/alternatives | grep "java-6-sun"
lrwxrwxrwx 1 root root 40 2010-07-23 16:18 appletviewer ->
/usr/lib/jvm/java-6-sun/bin/appletviewer
lrwxrwxrwx 1 root root 31 2010-07-23 16:18 apt ->
/usr/lib/jvm/java-6-sun/bin/apt
lrwxrwxrwx 1 root root 44 2010-07-23 16:18 ControlPanel ->
/usr/lib/jvm/java-6-sun/jre/bin/ControlPanel
lrwxrwxrwx 1 root root 36 2010-07-23 16:18 extcheck ->
/usr/lib/jvm/java-6-sun/bin/extcheck
lrwxrwxrwx 1 root root 41 2010-07-23 16:18 HtmlConverter ->
/usr/lib/jvm/java-6-sun/bin/HtmlConverter
lrwxrwxrwx 1 root root 32 2010-07-23 16:18 idlj ->
/usr/lib/jvm/java-6-sun/bin/idlj
lrwxrwxrwx 1 root root 37 2010-07-23 16:18 jarsigner ->
/usr/lib/jvm/java-6-sun/bin/jarsigner
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javac ->
/usr/lib/jvm/java-6-sun/bin/javac
lrwxrwxrwx 1 root root 35 2010-07-23 16:18 javadoc ->
/usr/lib/jvm/java-6-sun/bin/javadoc
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javah ->
/usr/lib/jvm/java-6-sun/bin/javah
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javap ->
/usr/lib/jvm/java-6-sun/bin/javap
lrwxrwxrwx 1 root root 40 2010-07-23 16:18 java-rmi.cgi ->
/usr/lib/jvm/java-6-sun/bin/java-rmi.cgi
lrwxrwxrwx 1 root root 39 2010-07-23 16:18 java_vm ->
/usr/lib/jvm/java-6-sun/jre/bin/java_vm
lrwxrwxrwx 1 root root 38 2010-07-23 16:18 javaws ->
/usr/lib/jvm/java-6-sun/jre/bin/javaws
lrwxrwxrwx 1 root root 36 2010-07-23 16:18 jconsole ->
/usr/lib/jvm/java-6-sun/bin/jconsole
lrwxrwxrwx 1 root root 40 2010-07-23 16:18 jcontrol ->
/usr/lib/jvm/java-6-sun/jre/bin/jcontrol
lrwxrwxrwx 1 root root 31 2010-07-23 16:18 jdb ->
/usr/lib/jvm/java-6-sun/bin/jdb
lrwxrwxrwx 1 root root 37 2010-07-23 16:18 jexec ->
/usr/lib/jvm/java-6-sun/jre/lib/jexec
lrwxrwxrwx 1 root root 42 2010-07-23 16:18 jexec-binfmt ->
/usr/lib/jvm/java-6-sun/jre/lib/jar.binfmt
lrwxrwxrwx 1 root root 32 2010-07-23 16:18 jhat ->
/usr/lib/jvm/java-6-sun/bin/jhat
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 jinfo ->
/usr/lib/jvm/java-6-sun/bin/jinfo
lrwxrwxrwx 1 root root 32 2010-07-23 16:18 jmap ->
/usr/lib/jvm/java-6-sun/bin/jmap
lrwxrwxrwx 1 root root 31 2010-07-23 16:18 jps ->
/usr/lib/jvm/java-6-sun/bin/jps
lrwxrwxrwx 1 root root 38 2010-07-23 16:18 jrunscript ->
/usr/lib/jvm/java-6-sun/bin/jrunscript
lrwxrwxrwx 1 root root 37 2010-07-23 16:18 jsadebugd ->
/usr/lib/jvm/java-6-sun/bin/jsadebugd
lrwxrwxrwx 1 root root 34 2010-07-23 16:18 jstack ->
/usr/lib/jvm/java-6-sun/bin/jstack
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 jstat ->
/usr/lib/jvm/java-6-sun/bin/jstat
lrwxrwxrwx 1 root root 34 2010-07-23 16:18 jstatd ->
/usr/lib/jvm/java-6-sun/bin/jstatd
lrwxrwxrwx 1 root root 40 2010-07-23 16:18 native2ascii ->
/usr/lib/jvm/java-6-sun/bin/native2ascii
lrwxrwxrwx 1 root root 39 2010-07-23 16:18 pack200 ->
/usr/lib/jvm/java-6-sun/jre/bin/pack200
lrwxrwxrwx 1 root root 42 2010-07-23 16:18 policytool ->
/usr/lib/jvm/java-6-sun/jre/bin/policytool
lrwxrwxrwx 1 root root 32 2010-07-23 16:18 rmic ->
/usr/lib/jvm/java-6-sun/bin/rmic
lrwxrwxrwx 1 root root 37 2010-07-23 16:18 schemagen ->
/usr/lib/jvm/java-6-sun/bin/schemagen
lrwxrwxrwx 1 root root 42 2010-07-23 16:18 servertool ->
/usr/lib/jvm/java-6-sun/jre/bin/servertool
lrwxrwxrwx 1 root root 41 2010-07-23 16:18 tnameserv ->
/usr/lib/jvm/java-6-sun/jre/bin/tnameserv
lrwxrwxrwx 1 root root 41 2010-07-23 16:18 unpack200 ->
/usr/lib/jvm/java-6-sun/jre/bin/unpack200
lrwxrwxrwx 1 root root 33 2010-07-23 16:18 wsgen ->
/usr/lib/jvm/java-6-sun/bin/wsgen
lrwxrwxrwx 1 root root 36 2010-07-23 16:18 wsimport ->
/usr/lib/jvm/java-6-sun/bin/wsimport
lrwxrwxrwx 1 root root 31 2010-07-23 16:18 xjc ->
/usr/lib/jvm/java-6-sun/bin/xjc
==

--
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.


Have no fear of perfection; you'll never reach it. (Salvador Dali)

From: Jordan Metzmeier on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Java has a separate alternatives command. It is "update-java-alternatives".

- --
Jordan Metzmeier

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJMZYY3AAoJEKj/C3qNthmTxM0P/1v9E1i/sU0S8WWHo4zECOHQ
VcGO6itjPwAoNeDzcdC2Tn9UWjSqo4rS7C0k3HAzHQi/UewBqf+KP7yF+eR+GSHT
ZS0tE8KmgQ7Tok8vCvryAP8C5ectnt2r+Gg6KvH1W0Obevz7Be/pLcsOrN+fHtIT
kDNmTea8mOAUM/JYJlpmbh1Cug/uRkCZVItiQNtC05ZvSmoMiZaWJ9bwJzhD1AXB
EjzMh9kA7Xa4PkPKLMnd7SasvJeRoPFhP3jaUnuyYlR/xo1YiJ8QhCe/YUlFB2W6
eTDCr9qxAztg6WB6JooOqn1OLQKYfX+QWz2mv89dDOY0rRkxwhwdjHQ5LQAQj+Q3
l0+N0ykeRsDzA+QdYu65XQooGQJA/Krvy7tOcTarkzNNdJ7oUy+B+bRAz0L3wqHN
iEzBmnYeEryxciG2fIqdn5+S2/CQG7PFwtxCdUWUDgeNNlW+GLM/l+dQQcZpxCUR
H9acHRNf+gDe63ULJifg34+UQQq4AdnIa/L+rPokvrm2UiEyXRwv2AWRYUGEAxIp
u2YKolUfOA+chLoK8T6PaaLR5qTbceGRGodzgcxpuLW5xcmuDA/3+5lg6g2vXUO+
N2/L00CJIwvsCTg6+o3FmIuA6q/GiSSbIPVdCHImW49FUu6ULCZy+JkSKve7dRLG
lQ3/F8/iZrTp7IakoHhy
=etxB
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C658637.3050407(a)gmail.com
From: Camaleón on
On Fri, 13 Aug 2010 19:33:56 +0200, Merciadri Luca wrote:

> Camaleón wrote:

>>
>> I think because you installed the package from outside Debian repos and
>> so it got not recognized inside the whole package database.
>>
>> ***
>> ls -l /etc/alternatives | grep "java-6-sun"
>> ***
>>
>> If it's not there, I guess it won't be detected/managed by "update-
>> alternatives" :-?
>>
>>
>>
>> Hmmm, by creating a symbolic link in the above dir? But maybe not the
>> better way, though. I would read "man update-alternatives" to find out.
>>
> It's there:

Sure...? :-P

> # ls -l /etc/alternatives | grep "java-6-sun"

(...)

> lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javac -> /usr/lib/jvm/java-6-sun/bin/javac
> lrwxrwxrwx 1 root root 35 2010-07-23 16:18 javadoc -> /usr/lib/jvm/java-6-sun/bin/javadoc
> lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javah -> /usr/lib/jvm/java-6-sun/bin/javah
> lrwxrwxrwx 1 root root 33 2010-07-23 16:18 javap -> /usr/lib/jvm/java-6-sun/bin/javap
> lrwxrwxrwx 1 root root 40 2010-07-23 16:18 java-rmi.cgi -> /usr/lib/jvm/java-6-sun/bin/java-rmi.cgi
> lrwxrwxrwx 1 root root 39 2010-07-23 16:18 java_vm -> /usr/lib/jvm/java-6-sun/jre/bin/java_vm
> lrwxrwxrwx 1 root root 38 2010-07-23 16:18 javaws -> /usr/lib/jvm/java-6-sun/jre/bin/javaws

Let's compare with mine:


stt008:~# update-alternatives --config java

Hay 3 alternativas que proveen `java'.

Selección Alternativa
-----------------------------------------------
1 /usr/bin/gij-4.3
+ 2 /usr/lib/jvm/java-gcj/jre/bin/java
* 3 /usr/lib/jvm/java-6-sun/jre/bin/java


So, we are looking for "*java*" alternatives, right? :-)

And...

sm01(a)stt008:~$ ls -l /etc/alternatives | grep "java-6-sun"

(...)

lrwxrwxrwx 1 root root 36 nov 15 2009 java -> /usr/lib/jvm/java-6-sun/jre/bin/java
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lrwxrwxrwx 1 root root 46 nov 15 2009 java.1.gz -> /usr/lib/jvm/java-6-sun/jre/man/man1/java.1.gz
lrwxrwxrwx 1 root root 39 jun 27 12:35 java_vm -> /usr/lib/jvm/java-6-sun/jre/bin/java_vm
lrwxrwxrwx 1 root root 38 jun 27 12:35 javaws -> /usr/lib/jvm/java-6-sun/jre/bin/javaws
lrwxrwxrwx 1 root root 48 jun 27 12:35 javaws.1.gz -> /usr/lib/jvm/java-6-sun/jre/man/man1/javaws.1.gz

I think the "java" link is the one you are missing.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.08.13.17.49.51(a)gmail.com
From: Merciadri Luca on
Jordan Metzmeier wrote:
> Java has a separate alternatives command. It is
> "update-java-alternatives".
>
# update-java-alternatives -l
java-6-sun 63 /usr/lib/jvm/java-6-sun
java-gcj 1042 /usr/lib/jvm/java-gcj


Normal?

--
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
I use PGP. If there is an incompatibility problem with your mail
client, please contact me.