LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-06-2009, 12:58 PM   #1
Dims
Member
 
Registered: Feb 2009
Posts: 151

Rep: Reputation: 15
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?
 
Old 05-06-2009, 01:08 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
1) I think gij is the default java bytecode interpreter installed with gcc. http://packages.debian.org/source/lenny/gcc-defaults

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).
 
Old 05-06-2009, 01:30 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
after installing the Sun java on Debian, don't forget to configure alternatives, else the default may still point to gij..

update-alternatives --config java
 
Old 05-07-2009, 09:17 AM   #4
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez View Post
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.

How to enable these repositories now?
 
Old 05-07-2009, 09:20 AM   #5
Dims
Member
 
Registered: Feb 2009
Posts: 151

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by farslayer View Post
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?

Sorry for my newbie quetions :>
 
Old 05-07-2009, 11:37 AM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
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
Then run aptitude update (with sudo or root).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Symlink for Java on Debian Lenny riganta Linux - Desktop 10 03-11-2010 10:01 AM
Debian Lenny AMD64 netinstall not detecting ethernet correctly the trooper Debian 6 07-28-2008 01:13 PM
Network card not detected correctly + DEBIAN LENNY - Dell Inspiron 1720 Laptop doraimom Linux - Laptop and Netbook 2 10-19-2007 06:37 PM
LXer: This week at LWN: How Sun's Java got into Debian LXer Syndicated Linux News 1 05-25-2006 08:12 PM
DISCUSSION: HOWTO: Install Sun's Java VM in Fedora Core 2 kevcart3 LinuxAnswers Discussion 9 10-28-2005 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration