How to install Sun's Java correctly on Debian/Lenny?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to install Sun's Java correctly on Debian/Lenny?
I see, that my distribution is already contains some JVM, but a free one, not Sun's.
Below is version output.
testbed:/usr/share# java -version
java version "1.5.0"
gij (GNU libgcj) version 4.3.2
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note, that gij package is not installed, not decribed in package.debian.org and gij command is not working:
testbed:/usr/share/java# gij
bash: /usr/bin/gij: No such file or directory
My questions are:
1) What package is responsible for java, shipped with Debian?
2) How to remove shipped java and turn to Sun's one?
When I am running an installer from Sun's site, it just creates a folder for JDK. Is this correct?
2) You have to have the non-free repositories available, then sudo aptitude install sun-java6-jre (or sun-java6-jdk for the developer tools) if there is a conflicting package, it should say so and ask if you want to uninstall the other one (or at the very least tell you what it is).
2) You have to have the non-free repositories available,
But how? I remember, that I have choose non-free ON while installation. But now I see no sun-java... packages neither in aptitude not in apt-cache search.
don't forget to configure alternatives, else the default may still point to gij..
update-alternatives --config java
I found the similiar functionality myself, in galternatives GUI program.
But new questions arose: it looks like alternatives changes only "java" symlink. But this is not only thing, java requires. What about JAVA_HOME variable and etc?
Edit /etc/apt/sources.list and just add non-free to the line
Code:
# See sources.list(5) for more information, especially
# Remember that you can only use http, ftp or file URIs
# CDROMs are managed through the apt-cdrom tool.
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.