How to configure Java Runtime Environment in Debian 4.0 ?
DebianThis forum is for the discussion of Debian Linux.
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 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.
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.
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
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.
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.
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)
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.