LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-05-2007, 12:14 AM   #1
packets
Member
 
Registered: Oct 2005
Posts: 339

Rep: Reputation: 32
how to install java


Can someone show me how to install java on debian? I'm not really a debian guy that's why I'm asking you guyz. I done some searching but I stuck in some of the procedure.

apt-get install fakeroot
apt-get install java-package
fakeroot make-jpkg jdk-6u1-linux-i586.bin (Then it just freeze)

I think there must be a questions after the fakeroot but it just freeze and didn't show any prompt. It just hangup.

I screwed up this Debian before by doing an apt-get -f install and it did remove some package and cause some commands to be available like vi. Could be some package has been remove? But when installed fakeroot it is successful

Any advise? Thanks!
 
Old 11-05-2007, 03:04 AM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
try 'sudo' instead. this executes commands as root...
sudo apt-get install java-package
 
Old 11-05-2007, 09:01 AM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

If you have Debian Etch or newer, an easier way is just to enable non-free. Edit /etc/apt/sources.list and add "non-free" after "main" in all those lines, and after an apt-get update you can install what you need.

apt-cache search java |grep sun
sun-java5-bin - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture dependent files)
sun-java5-demo - Sun Java(TM) Development Kit (JDK) 5.0 demos and examples
sun-java5-doc - Sun JDK(TM) Documention -- integration installer
sun-java5-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java5-jdk - Sun Java(TM) Development Kit (JDK) 5.0
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture independent files)
sun-java5-plugin - The Java(TM) Plug-in, Java SE 5.0
sun-java5-source - Sun Java(TM) Development Kit (JDK) 5.0 source files

So you won't get version 1.6, at least not with Debian Etch, but is that a problem?
 
Old 11-05-2007, 09:27 AM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,887
Blog Entries: 28

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
apt-get update && apt-get install sun-java6-jre sun-java6-plugin [or -jdk, for dev-work] ; then do: update-alternatives --config java

Simple as that, you do need contrib non-free in your sources.list
 
Old 11-05-2007, 06:25 PM   #5
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
@j-ray

I already did that before. I already reinstall java-package using apt-get remove and apt-get install but still it just hang up when I do fakeroot make-jpkg <java.bin>

@craigevil

I could not install java. It couldn't find the package. Could I know the repository?

spamfilter:/home/admin# apt-get install sun-java6-jre sun-java6-plugin
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package sun-java6-jre

@Guttorm

I don't know what version of debian is this. But I belive this is an old version due to kernel version (Linux spamfilter 2.4.18 #2 Thu Apr 11 14:37:17 EDT 2002 sparc64 GNU/Linux)
Here is the result of apt-cache search java |grep sun

spamfilter:/home/admin# apt-cache search java |grep sun
jikes-sun - Wrapper for jikes using Sun Java classes
sun-java5-doc - Sun JDK(TM) Documention -- integration installer
sun-java5-fonts - Lucida TrueType fonts (from the Sun JRE)
sun-java5-jre - Sun Java(TM) Runtime Environment (JRE) 5.0 (architecture independent files)
sun-java5-source - Sun Java(TM) Development Kit (JDK) 5.0 source files

Is it installed? If yes, how come when I do java -version says "command not found"?
 
Old 11-05-2007, 06:27 PM   #6
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
Here's a copy of my repository

deb ftp://ftp.wa.au.debian.org/debian/ stable main
deb-src ftp://ftp.wa.au.debian.org/debian/ stable main
deb-src http://non-us.debian.org/debian-non-US stable/non-US main

deb ftp://ftp.au.debian.org/debian/ stable main
deb-src ftp://ftp.au.debian.org/debian/ stable main
deb-src http://non-us.debian.org/debian-non-US stable/non-US main

deb http://security.debian.org/ stable/updates main

deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free

deb http://ftp.us.debian.org/debian sarge main contrib non-free

Is it OK or do I need to update this?
 
Old 11-05-2007, 09:36 PM   #7
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,887
Blog Entries: 28

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Get rid of the non-us and sarge references then do apt-get update apt-get dist-upgrade

1.5 is in Etch and Lenny, 1.6 is only in Sid.
http://packages.debian.org/search?ke...mozilla-search

You can change the country code to whereever you are.
#Stable
#deb http://http.us.debian.org/debian/ stable main contrib non-free
#Stable Sources
#deb-src http://http.us.debian.org/debian/ stable main contrib non-free
#Security Updates Stable
#deb http://security.debian.org/ stable/updates main contrib non-free

You might want backports as well, but add it after you upgrade to Etch.

# Debian Stable Backports
# For information visit
# http://www.backports.org/dokuwiki/do...d=instructions
# If you need the backports key, try
# gpg --recv-keys 16BA136C
# gpg --export |apt-key add -
#deb http://www.backports.org/debian etch-backports main contrib non-free
 
Old 11-05-2007, 10:51 PM   #8
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
@craigdevil

Thanks for the reply. I'm currently into apt-get dist-upgrade and will take time. Let's see what happen. I'll post what's the outcome after the update.
 
Old 11-06-2007, 10:56 PM   #9
packets
Member
 
Registered: Oct 2005
Posts: 339

Original Poster
Rep: Reputation: 32
Seems nothing happen. The last line is :

Selecting previously deselected package mktemp.
Unpacking mktemp (from .../mktemp_1.5-2_sparc.deb) ...
Replacing files in old package debianutils ...
Errors were encountered while processing:
/var/cache/apt/archives/apache2-mpm-prefork_2.2.3-4+etch1_sparc.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
spamfilter:/var/lib/apt/lists#

Still when I do fakeroot make-jpkg <java.bin>, it just hangup.

Is there another way to install java sdk?
 
  


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
I am trying to install Java on Ubuntu. How to install it? ussr_1991 Linux - Software 4 07-24-2007 01:50 PM
java does not install in opt but install in usr bbmak Linux - Software 6 10-02-2005 11:13 PM
what directory is java install? what CMD determined where java is install? Thks. suse2166 Linux - Newbie 2 09-04-2005 08:24 PM
How Do you install Java? wizjr1 Fedora 3 07-03-2004 08:52 AM
Java Install Please Help!!! unwrittenlaw Linux - Newbie 22 11-08-2003 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:23 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