LinuxQuestions.org
Visit Jeremy's Blog.
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 02-05-2007, 12:33 AM   #1
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
Java 1.6 for Debian


The Java 1.6 binary is available from Sun.

Upon trying my old-fashioned way of installing it, I discovered an error in the execution of make-jpkg. It just told me that a plugin was missing and died. I imagine there will be an update to java-package soon.

So I followed this howto instead, installing the JRE instead of the JDK. After banging my head against the keyboard a while I did get it working on my 64-bit system. I had too many problems (primarily due to my own incompetence) to include a short howto here, but I have a couple 32-bit systems to get it on, and by then I may be able to add some helpful tips.

The 64-bit installation still does not include a mozilla plugin. Not sure why that is such a problem, but I imagine there are good reasons. Konqueror, works for Java applets, and my other regularly used Java apps didn't have any problems.

Last edited by rickh; 02-05-2007 at 12:51 AM.
 
Old 02-05-2007, 07:03 PM   #2
fogcat
Member
 
Registered: May 2004
Location: Cortland County NY USA
Distribution: Mint
Posts: 60

Rep: Reputation: 15
Use synaptic/ aptget. There are deb packages for this, I have used them.

fogcat
 
Old 02-05-2007, 10:18 PM   #3
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Not for version 1.6, you haven't
 
Old 02-05-2007, 10:28 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,886
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
sun-java6 is in Sid at least for i86.

Did apt-get install sun-java6-jre sun-java6-bin sun-java6-plugin

Then ran update-alternatives --config java

It showed:
There are 2 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
* 1 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
+ 2 /usr/lib/jvm/java-6-sun/jre/bin/java

Press enter to keep the default[*], or type selection number: 2
Using `/usr/lib/jvm/java-6-sun/jre/bin/java' to provide `java'.

root@craigevil:/home/craig# java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

I then tried running Frostwire and Azureus and they both worked just fine.

The first time I tried using java6 I stupidly uninstalled java5 first and had problems, since neither Frostwire or Azureus would run and java -version didn't show anything.

Actually seems a tad bit faster in Iceweasel when it comes to loading applets.
 
Old 02-05-2007, 10:56 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Oops. I stand corrected. I thought it was still a beta at Sun. I had a problem getting it to work with Iceweasel on my laptop. Worked fine on the 32-bit desktop. Guess I'll try the Sid version.
 
Old 02-20-2007, 04:42 PM   #6
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Question

My repos are:

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

deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free

deb http://ftp.debian-unofficial.org/debian/ etch main contrib non-free restricted
deb-src http://ftp.debian-unofficial.org/debian/ etch main contrib non-free restricted

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

deb http://www.debian-multimedia.org etch main
deb-src http://www.debian-multimedia.org etch main

deb http://getswiftfox.com/builds/debian unstable non-free

I installed 'sun-java6-jre sun-java6-bin sun-java6-plugin' with Synaptic. These are my results [I've always had a difficult time with java in Debian but not in other distros]:

:~# update-alternatives --config java

There is only 1 program which provides java
(/usr/lib/jvm/java-6-sun/jre/bin/java). Nothing to configure.
:~# java -version
-su: java: command not found

I then did what has worked in the past which I got from rickh's How To for Sun-java 1.5:

:~# ln -s /usr/lib/jvm/java-6-sun /usr/lib/java
ln: creating symbolic link `/usr/lib/java/java-6-sun' to `/usr/lib/jvm/java-6-sun': File exists
:~# nano /etc/profile

and edited '/etc/profile' to read:


# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
fi

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi

export PATH

JAVA_HOME="/usr/lib/java"
export JAVA_HOME

umask 022


and I still get the same results:

:~# cd /usr/lib/java
:/usr/lib/java# ls
java-6-sun
:/usr/lib/java# update-alternatives --config java

There is only 1 program which provides java
(/usr/lib/jvm/java-6-sun/jre/bin/java). Nothing to configure.
:/usr/lib/java# java -version
-su: java: command not found

So what did I do wrong???

Also see:

http://www.linuxquestions.org/questi...d.php?t=530790
 
Old 02-20-2007, 05:02 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Original Poster
Rep: Reputation: 62
Try:

# update-alternatives --auto java
 
Old 02-20-2007, 05:48 PM   #8
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Question

Quote:
Originally Posted by rickh
Try:

# update-alternatives --auto java
Thanks rickh. Before I got to your post I had reinstalled 'sun-java5-bin' to go with already installed 'sun-java6-bin sun-java6-plugin azureus' all with Synaptic. As well as having previously created link:

ln -s /usr/lib/jvm/java-6-sun /usr/lib/java

and adding lines:

export PATH

JAVA_HOME="/usr/lib/java"
export JAVA_HOME

umask 022

to replace:

export PATH


umask 022

in '/etc/profile'. Now I'm getting results:

:~# update-alternatives --auto java
:~# update-alternatives --config java

There are 2 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-6-sun/jre/bin/java
2 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

Press enter to keep the default[*], or type selection number:
:~# java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

However azureus still won't open. I don't have Frostwire in my repos, is there a repo with it? When I try to open Azureus from cli I still get same error:

:/usr/bin# ./azureus
./azureus: line 3: /usr/share/java-config/libswt-3.2-java: No such file or directory

I'll reboot and see if that does the trick. Any other ideas to get Azureus to work? Is this a BUG? libswt-3.2-java is not found by 'apt-cache search'. 'apt-cache search libswt'results in:

libswt-gnome-gtk-3.2-jni - Standard Widget Toolkit for GTK Gnome JNI library
libswt-gtk-3.2 - Standard Widget Toolkit for GTK native library
libswt-gtk-3.2-java - Standard Widget Toolkit for GTK Java library
libswt-gtk-3.2-jni - Standard Widget Toolkit for GTK JNI library
libswt-gtk-dev - Standard Widget Toolkit for GTK development
libswt-mozilla-gtk-3.2 - Standard Widget Toolkit for GTK Mozilla Java library
libswt-mozilla-gtk-3.2-jni - Standard Widget Toolkit for GTK Mozilla JNI library
libswt-mozilla-gtk-dev - Standard Widget Toolkit for GTK Mozilla JNI library
libswt3.2-gtk-gcj - Fast and rich GUI toolkit for Java, gtk2 (GCJ version)
libswt3.2-gtk-java - Fast and rich GUI toolkit for Java, gtk2 version
libswt3.2-gtk-jni - Platform dependent files for libswt3.2-gtk-java

I have 'libswt-gtk-3.2-java libswt-gtk-3.2-jni' installed. I use KDE Desktop. I'm wondering if I need to maybe install some Gnome apps but wouldn't they have been installed by default when I installed Etch as it installs ONLY Gnome Desktop and I had to add KDE after install???
 
Old 02-20-2007, 06:08 PM   #9
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Unhappy

Well I rebooted and Azureus still won't open. I obviously have java:

:~$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
:~# update-alternatives --config java

There are 2 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-6-sun/jre/bin/java
2 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

Press enter to keep the default[*], or type selection number: 1
Using `/usr/lib/jvm/java-6-sun/jre/bin/java' to provide `java'.
:~# java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

So the problem must be here:

:/usr/bin# ./azureus
./azureus: line 3: /usr/share/java-config/libswt-3.2-java: No such file or directory

What do I do to fix???
 
Old 02-20-2007, 08:54 PM   #10
Red Knuckles
Member
 
Registered: Jan 2006
Location: Colorado USA
Distribution: Debian AMD 64 Testing, Sabayon Linux x86-64 3.4, and Ubuntu AMD 64 7.04
Posts: 235

Rep: Reputation: 30
Talking

I finally got a SOLUTION from:

http://www.linuxquestions.org/questi...23#post2638823

Thanks cgjones! What I did was:

#aptitude purge azureus
#aptitude reinstall libswt-gtk-3.2-java
#aptitude install azureus

AND AZUREUS WORKS!!! Whee Doggie!!! Finally!!!

 
Old 11-05-2007, 03:50 PM   #11
seiffs
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
Smile line 3: /usr/share/java-config/libswt-3.2-java: No such file or directory solved

I had to solve it too. Debian sid 5.11.2007.
solution:
# cd /usr/share/java-config
# ln -s libswt-3.3-java libswt-3.2-java

thats all
 
  


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
debian/firefox/java mcgworld Debian 4 12-08-2005 12:50 PM
install java in debian master Debian 10 08-25-2005 02:05 PM
Java and Debian Jaster Debian 11 12-22-2004 02:49 AM
Java on Debian AfterBurn Linux - Software 1 01-22-2004 06:00 PM
java/mozilla/debian crashmeister Linux - General 4 05-27-2002 06:10 AM

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

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