LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java Runtime Environment 1.6.0_01 not working in Debian (https://www.linuxquestions.org/questions/linux-software-2/java-runtime-environment-1-6-0_01-not-working-in-debian-550716/)

saturnine 05-02-2007 01:22 PM

Java Runtime Environment 1.6.0_01 not working in Debian
 
Hi,

I'm trying to get JRE 1.6.0_01 to work in my Debian 2.6.17-2-k7 (testing/unstable).

I've unpacked and compiled JRE and copied it in the /usr/bin-directory.

When I say "java" in the command line this is what I get:

java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Does this mean that java isn't in the PATH? How do I put it there?

Thanks!

saturnine

jay73 05-02-2007 01:35 PM

Why didn't you install that from the repositories? It's just so much easier. Just go to System > Administration > Synaptic Package Manager and select the Sun jre or jdk.

Then you may still need to set JAVA(orJRE) home:

echo JAVA_HOME=/path/to/jre >> /etc/profile (substitute with JRE_home as required)
echo export JAVA_HOME >> /etc/profile (substitute as required)
source /etc/profile

Then if as root you do

echo $JAVA(or JRE)_HOME

it should return the path to your JRE/JDK.

If you do

java -version

it should return the version of the jdk/jre currently installed.

rickh 05-02-2007 02:38 PM

Quote:

my Debian 2.6.17-2-k7 (testing/unstable)
Not sure how you're running that kernel in testing-unstable. The current kernel in Testing is 2.6.18-4 and in Unstable it's 2.6.20-1. It amazes me how many people still haven't realized that Stable and Tesing are not the same as they were a few weeks ago. That lack of knowledge can lead to a lot of problems for people trying to find packages in the Debian archives.

saturnine 05-02-2007 03:22 PM

Thanks for the reply Jay,

I've used apt-get several times, but here's the thing: I'm trying to install a software called Jin.
(http://www.jinchess.com/) It requiers the original version of Java, not the implemention.

When I do

./jin

this is what I get:

You seem to be running GNU's Java implementation, which is incomplete.
Jin requires Sun's Java (or a fully compatible version) 1.4 or later.
If you can't install it with your distribution's package manager, you
can obtain and install it manually from http://www.java.com

So that's why.. any good ideas? I'm all out.

--
saturnine

rickh 05-02-2007 05:38 PM

apt provides a very simple solution to that problem, but I think you should first post your /etc/apt/sources.list file so we can make sure what we are dealing with here.

jay73 05-02-2007 05:40 PM

Exactly, you really need the package called sun-jdk-(?).

saturnine 05-03-2007 01:27 AM

Thanks again, you both!

Here's my /etc/apt/sources.list

deb http://ftp.fi.debian.org/debian/ testing main non-free contrib
deb-src http://ftp.fi.debian.org/debian/ testing main non-free contrib

deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main

deb ftp://ftp.nerim.net/debian-marillat sid main

deb http://http.us.debian.org/debian/ experimental main contrib non-free
deb http://http.us.debian.org/debian/ unstable main contrib non-free
deb http://security.debian.org/ testing/updates main

saturnine

saturnine 05-03-2007 01:34 AM

Jay73,

Got the sun-java6-jdk package. Still getting the same error from Jin.

saturnine

jay73 05-03-2007 03:28 AM

Hmm, for all I know it could simply be that JIN (not familiar with it) is lagging and does not support jdk6 yet. I had a similar problem using webworks (and perharps Spring as well, I don't remember). See what happens if you use jdk5 instead.

rickh 05-03-2007 07:16 AM

First a little housekeeping. Unless you know what you're doing, that's a pretty ugly sources.list file. Do you have an /etc/apt/apt.conf file? If yes, what's in it?

If no, get the duplications out of there. Assuming you live in the US, it should look something like this:
Quote:

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

deb http://security.debian.org/ testing/updates main
deb-src http://security.debian.org/ testing/updates main

deb http://www.debian-multimedia.org testing main

#deb http://http.us.debian.org/debian/ experimental main contrib non-free
#deb http://http.us.debian.org/debian/ unstable main contrib non-free
If you live in Finland, change "us" to "fi" in the top two lines.
debian-marillat has changed its name to debian-multimedia.
Notice I have commented out the Sid and Experimental repos. Normally you choose only one (Testing, in this case). The effect of having the multiple is that any upgrade you do will be pulled from the least stable repository. If you specifically need something from Sid or Experimental, you can temporarily uncomment that line, get the needed package, then replace the comment. Any time you change that file, you have to run an "update."

**********
Now, back to the original question. What is now the output of $ java -version

saturnine 05-03-2007 03:10 PM

Housekeeping tips are something I'm always open for! :) And yes, you assumed right, I pretty much don't know what I'm doing.. Well, that's why I'm here. A friend of mine helped me to install Debian but I'm tired of bothering him all the time.

Here's my /etc/apt/apt.conf:

APT::Authentication::TrustCDROM "true";
Acquire::::Proxy "false";

And "java -version" gives me this:

java version "1.4.2"
gij (GNU libgcj) version 4.0.3 20051204 (prerelease) (Debian 4.0.2-5j2)


--
saturnine

:newbie:

rickh 05-03-2007 04:30 PM

Quote:

java version "1.4.2"
gij (GNU libgcj) version 4.0.3 20051204 (prerelease) (Debian 4.0.2-5j2)
OK. Make your sources.list file look like the one I gave you, then:
# aptitude keep-all
# aptitude update
# aptitude install sun-java6-jre

Then run $ java -version again

You should see a significant change.

saturnine 05-04-2007 01:31 AM

Hi,

did all that and still there's no change.

$aptitude update

gives some errors:

W: Couldn't stat source package list http://www.debian-multimedia.org
testing/main Packages
(/var/lib/apt/lists/www.debian-multimedia.org_dists_testing_main_binary-i386_Packages)
- stat (2 No such file or directory)
W: You may want to update the package lists to correct these missing files
W: GPG error: http://www.debian-multimedia.org testing Release: The
following signatures couldn't be verified because the public key is not
available: NO_PUBKEY 07DC563D1F41B907
W: GPG error: http://ftp.fi.debian.org testing Release: The following
signatures couldn't be verified because the public key is not available:
NO_PUBKEY A70DAF536070D3A1
W: GPG error: http://security.debian.org testing/updates Release: The
following signatures couldn't be verified because the public key is not
available: NO_PUBKEY A70DAF536070D3A1
W: You may want to run apt-get update to correct these problems

And when I say apt-get update it gives the same errors..

$java -version still brings the same text as it did before.

--
saturnine

rickh 05-04-2007 01:40 AM

Quote:

$java -version still brings the same text as it did before.
If you have errors, you can't just keep plugging on and expect to get results. You first have to clear the errors.

For each of the "PUBKEY" errors, do this.

# gpg --keyserver wwwkeys.eu.pgp.net --recv-keys XXXXXXXXXXXXXXXX
# apt-key add /root/.gnupg/pubring.gpg

Replace XXXXXXXXXXXXXXXX with the key given in the error message.

When you've done them all, try "# aptitude update" again

saturnine 05-05-2007 05:28 AM

Quote:

Originally Posted by rickh
If you have errors, you can't just keep plugging on and expect to get results. You first have to clear the errors.

Of course. I just didn't have a clue what to do with the pubkey thing.

I did what you adviced with the pubkeys, it worked. "Aptitude update" doesn't bring any errors now. When I run "aptitude install sun-java6-jre", it doesn't install any new packages because sun-java6-jre is already installed.

So, should I first remove it and then install it again? Can I remove it using aptitude and if yes, then how?

Thanks a bunch, I should maybe start paying you something for helping me this much. :)

saturnine


All times are GMT -5. The time now is 11:40 PM.