LinuxQuestions.org
Review your favorite Linux distribution.
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 12-10-2009, 08:55 PM   #1
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Rep: Reputation: 15
Question How to configure Java Runtime Environment in Debian 4.0 ?


Hello,

This is 1st time I am using Debian on my x86 dual core laptop. Earlier I used OpenSuSe.

I downloaded jre6.17u , done extraction etc ran the bin file. It showed gcc not ofund, installed gcc from gksu synaptic, then installation went ok I guess. But if I say "java verison" using su it shows following >

Quote:
debian:/home/amey# java version
Exception in thread "main" java.lang.NoClassDefFoundError: version
at gnu.java.lang.MainThread.run(libgcj.so.70)
Caused by: java.lang.ClassNotFoundException: version not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.70)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
debian:/home/amey#
How can I configure jre now?
Problem is when I open freenode java based web page in Iceweasel it shows install Java plugin it means it failed to detect installed java stuff. I also copied jre installed folder to /opt which got installed on my Desktop. I fixd root as ownert with 777 permissions.

Also need to configure libflashplayer.so
I tried to copy that so file under /usr/lib/Iceweasel using chmod 777 but youtube page still says no flash player found.

Rest features I liked like audio/video plug ins are installed by default, my 500 gb maxtor hdd got detected with no prob.

But still wi-fi is not getting installed. I dont see power signal although wi-fi switch is ON.

Any help?

Regards,
AmeY.

Last edited by sco1984; 12-10-2009 at 09:01 PM.
 
Old 12-10-2009, 10:12 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Are you really using Debian 4 (old stable), not 5 (Lenny, current stable)? If you are using 5, I (and others) can probably help.

Evo2.
 
Old 12-10-2009, 10:20 PM   #3
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by evo2 View Post
Are you really using Debian 4 (old stable), not 5 (Lenny, current stable)? If you are using 5, I (and others) can probably help.

Evo2.
Yes I am sure it's Debian 4.0r stable release. I have Debian 5 iso too.
I dont mind to install Debian 5 version as nothing is configured so far.

Regards,
AmeY.
 
Old 12-10-2009, 11:18 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by sco1984 View Post
I dont mind to install Debian 5 version as nothing is configured so far.
In that case I strongly recommend installing Debian 5. After you have it running, report back. Then we can help you install flash and JRE: preferably using deb packages.

Cheers,

Evo2.
 
Old 12-11-2009, 01:11 AM   #5
AleLinuxBSD
Member
 
Registered: May 2006
Location: Italy
Distribution: Ubuntu, ArchLinux, Debian, SL, OpenBSD
Posts: 274

Rep: Reputation: 42
Try use this command:
java -version
with the symbol "-" before the word version.

Also there isn't any necessity to run java as root.

Quote:
Originally Posted by sco1984 View Post
This is 1st time I am using Debian on my x86 dual core laptop. Earlier I used OpenSuSe.
Better have a separate partition where you can put data and at least some program indipendently by the OS.

If you avoid to reinstall for example java you have even other benefits as for example:
you are always sure to have the same version of java in every OS
you avoid to lose space (despite the mass storage are cheap)

Last edited by AleLinuxBSD; 12-11-2009 at 01:15 AM.
 
Old 12-11-2009, 02:48 PM   #6
alioop
Member
 
Registered: Mar 2004
Location: Houston,Texas
Distribution: Via Debian!!!
Posts: 113

Rep: Reputation: 22
sco1984, Debian 4.0 is somewhat an older Debian Stable OS. I believe its classified as 'older Stable'. Like others have suggested, install the latest Stable - Lenny. Your experience will be better.

If some people think Debian Stable 5.0 apps are behind the technical curve - and I really don't think so, Debian (older Stable) 4.0 is even further behind. I don't want to throw any more doubt into the mix by suggesting using Testing (Squeeze). So I won't. But before you go any further, try the latest Debian Stable (Lenny-5.0) Save yourself some time and effort and use Lenny.

Also Jre runtime is in the repos. I'm certain it's in 4.0 (Etch) repos as well as the new Stable (Lenny) reposes. It's a simple matter of - as root - apt-get install sun-java-jre. Ver. 5 for Etch and 6 for Lenny. Or do a search for it with Synaptic. Use the command jre or Java. And if you want to install Flash, it's also there.
 
Old 12-11-2009, 04:13 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
Adobe Flash
To install from Lenny-Backports, add the following line to your /etc/apt/sources.list file:
deb http://www.backports.org/debian lenny-backports main contrib non-free
and run:
# apt-get update
#apt-get install debian-backports-keyring
# apt-get -t lenny-backports install flashplugin-nonfree

Testing and Unstable can just do apt-get install flashplugin-nonfree

Sun Java
Make sure you have contrib non-free in your Debian sources.list
apt-get install sun-java6-plugin sun-java6-jre (or jdk)

WiFi - Debian Wiki - http://wiki.debian.org/WiFi
 
Old 12-11-2009, 08:06 PM   #8
alioop
Member
 
Registered: Mar 2004
Location: Houston,Texas
Distribution: Via Debian!!!
Posts: 113

Rep: Reputation: 22
I know for a fact it's not necessary to add 'backports' to your sources.list in order to add flash or java or many other things. Unless you want to upgrade certain applications. Of course the contrib and media repos are necessary for other apps.

Don't be so quick to add backports. Try it without them first. Then add them if necessary. But wait until needed. I've never used them at all. Nor have I had the need.
 
Old 12-11-2009, 10:04 PM   #9
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
Quote:
Originally Posted by alioop View Post
I know for a fact it's not necessary to add 'backports' to your sources.list in order to add flash or java or many other things. Unless you want to upgrade certain applications. Of course the contrib and media repos are necessary for other apps.

Don't be so quick to add backports. Try it without them first. Then add them if necessary. But wait until needed. I've never used them at all. Nor have I had the need.
Adobe's Flash is not now, nor will it ever be in the "stable" repo.

Adobe Flash Player is <non-free> and cannot be in a stable Debian release, as Adobe doesn't provide security support for older versions (see http://bugs.debian.org/457291). The easiest way to install flash is with the flashplayer-mozilla package from <debian-multimedia.org>; there is also a flashplugin-nonfree <contrib> package for testing, sid and backports.org users. http://wiki.debian.org/FlashPlayer

The only way to get Adobe's Flash and not one of the "free" versions like gnash is either to use backports.org or the dmm repos if you are running Debian stable.

Java in Etch
Available free Java implementations can be listed via "apt-cache search java-virtual-machine". If you need to run software not supported by free implementations (e.g. anything not in main and some websites using java controls), install sun-java5-plugin from <non-free> or sun-java6-plugin from <backports.org>.

For Lenny, testing, sid
For the java plugin install either the icedtea-gcjwebplugin (free) plugin or the sun-java6-plugin (<non-free>). For other java programs (lenny onwards), you can install the default-jre package to get install a java runtime, or "apt-cache search java-virtual-machine" to see other
implementations.The best options are probably openjdk-6-jre or sun-java6-jre.
 
Old 12-15-2009, 12:18 PM   #10
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Original Poster
Rep: Reputation: 15
ok people now I have installed Debian 5.3 stable release.
Kernel >
Quote:
T60:/home/amey# uname -a
Linux T60 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 GNU/Linux
T60:/home/amey#
I fire this command to check Java version. java -version ..output is >>
Quote:
T60:/home/amey# 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.
T60:/home/amey#
still iceweasel cant open freenode java based web page.

2nd thing wi-fi got working in this edition.

1 strange problem its not mounting my external maxtor 500 gig HDD. When I use mount -t ntfs /dev/sdb1 /mnt/maxtor it says Permission denied. I tried powering off maxtor hdd and turned on. same problem. Also tried rebooting Debian. Installed all fuse & ntfs packages via synaptic from DVD 1. Still its not mounting any ntfs partitions.

Any clue?

Regards,
AmeY.
 
Old 12-15-2009, 12:21 PM   #11
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by craigevil View Post
Adobe Flash

# apt-get update
#apt-get install debian-backports-keyring
]
When I run above command I get following error >>
Quote:
T60:/home/amey# apt-get install debian-backports-keyring
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package debian-backports-keyring
T60:/home/amey#
Why is that?

Regards,
AmeY.
 
Old 12-15-2009, 12:46 PM   #12
sco1984
Member
 
Registered: Sep 2005
Location: Pune, India
Distribution: openSUSE Leap
Posts: 137

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by sco1984 View Post

1 strange problem its not mounting my external maxtor 500 gig HDD. When I use mount -t ntfs /dev/sdb1 /mnt/maxtor it says Permission denied.
AmeY.
Ok solved now.

I had to boot in to Windows. Then I did chkdsk for maxtor

Rebotoed in to Debian, Debian did chkdsk too and it mounted maxtor hdd automatically. Hurrah!!

And yes wi-fi is working but LED is not blinking. Any tweak is required on kernel level to make sure wi-fi LED glows while its ON?

Last edited by sco1984; 12-15-2009 at 12:56 PM.
 
Old 12-16-2009, 09:57 AM   #13
pliqui
Member
 
Registered: Feb 2007
Location: Caracas, Venezuela
Distribution: Debian x64
Posts: 156

Rep: Reputation: 17
Installing Java

i'm a java developer and i work with SUN JAVA, to get the sun java first you need to do a couple of things (on Debian Lenny 5.x).

1.- Add contrib and non free to your repositories

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

2.-
Code:
aptitude update
3.-
Code:
aptitude install sun-java6-jre sun-java6-plugin
4.- Select SUN JAVA as your default JRE

Code:
intranet:/etc/apt# update-alternatives --config java

There are 3 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
*         1    /usr/lib/jvm/java-6-sun/jre/bin/java
          2    /usr/bin/gij-4.3
 +        3    /usr/lib/jvm/java-gcj/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'.


intranet:/etc/apt# update-alternatives --config javac

There are 4 alternatives which provide `javac'.

  Selection    Alternative
-----------------------------------------------
*         1    /usr/lib/jvm/java-6-sun/bin/javac
          2    /usr/bin/ecj
          3    /usr/bin/gcj-wrapper-4.3
 +        4    /usr/lib/jvm/java-gcj/bin/javac

Press enter to keep the default[*], or type selection number: 1
Using '/usr/lib/jvm/java-6-sun/bin/javac' to provide 'javac'.
And you are done. you have your JRE and the browser plugin.

And i will use this post to ask if there is a better jvm than sun? just wondering, faster and ligther.

let me know if this worked.
 
Old 12-16-2009, 01:48 PM   #14
alioop
Member
 
Registered: Mar 2004
Location: Houston,Texas
Distribution: Via Debian!!!
Posts: 113

Rep: Reputation: 22
Quote:
Originally Posted by sco1984 View Post
When I run above command I get following error >>


Why is that?

Regards,
AmeY.
sco1984, for the KEY for the backports or any new repository added:

# If you get errors about missing keys, lookup the key in this file
# and run these commands (replace KEY with the key number):
# gpg --keyserver subkeys.pgp.net --recv KEY
# gpg --export --armor KEY | apt-key add -

Where the word KEY is, insert the numbered key asked for. Then apt-get update. You should not get the error message again.

Since I can't remember the command, I usually add this to the end of my /etc/apt.sources.list file along with the comments (#) as you see for easy reference.
 
  


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
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Java Runtime Environment 1.6.0_01 not working in Debian saturnine Linux - Software 16 05-06-2007 05:09 AM
Java Runtime Environment - Debian Grimmi- Linux - Software 2 09-23-2006 01:32 AM
Java Runtime Environment (Debian/FireFox) nutnut Linux - Software 2 10-28-2005 06:58 PM
using debian .. how do i get java runtime environment? pinkfae222 Linux - Newbie 3 07-15-2005 11:49 PM

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

All times are GMT -5. The time now is 04:08 PM.

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