LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-12-2005, 08:08 AM   #1
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 0
Sun's Java 1.3 on Fedora 4 - help!


Dear all,

I got the following message after I installed and tried to run Sun Microsystem's Java 1.3 under Fedora 4 (This error occurs when I try to run the 'javac' or 'java' commands):

Unable to load native library: /usr/java/j2sdk1.3.0_05/jre/lib/i386/libjava.so: symbol __libc_waitpid, version GLIBC_2.0 not defined in file libc.so.6 with link time reference.

I was told that this problem happens because Java 1.3 is looking for a 2.0 release of glibc, which means I needed to install the compat-libgcc-296 package.

I downloaded compat-libgcc-296-2.96-132.fc4.i386.rpm and ran:

rpm -i compat-libgcc-296-2.96-132.fc4.i386.rpm

to install it. And then ran:

/sbin/ldconfig

to update the library with the latest links. However, I still receive the same error message when I try to run 'java'. Is there something else I'm missing with the rpm install? Are there any additional configurations I need to make to get GLIBC to work on Fedora as the default package?

I also ran the following command to find out all the libraries libjava.so is looking for:

ldd /usr/java/j2sdk1.3.0_05/jre/lib/i386/libjava.so

and got the following results:

linux-gate.so.1 => (0x00a4f000)
libjvm.so => not found
libverify.so => not found
libnsl.so.1 => /lib/libnsl.so.1 (0x00f7000)
libd1.so.2 => /lib/libd1.so.2 (0x00b29000)
libc.so.6 => /lib/libc.so.6 (0x004d7000)
/lib/ld-linux.so.2 (0x0045e000)

Do these lines make sense to anybody? Any idea why Java 1.3 won't work on Fedora from looking at the output above? I am still quite new to Linux, so am really not sure how to proceed from here.

Would very much appreciate it if someone could point me in the right direction.

Thanks!

Phil

Last edited by stinky_tofu; 12-12-2005 at 08:44 AM.
 
Old 12-12-2005, 10:23 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
You should be using a more current version of j2sdk like j2sdk-1_4_2_10

http://java.sun.com/j2se/1.4.2/download.html

In addition you do realize FC4 has it's own version of java packages installed that may interfere with your efforts, for example;

java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh.i386.rpm
 
Old 12-12-2005, 10:42 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
JDK 1.5 is probably the best version to use because some java apps like LimeWire and Azureus work better with it. Also you should not install Suns java on FC4 using rpms because it overwrites some java files needed and shipped by Fedora Core 4.
 
Old 12-12-2005, 11:43 AM   #4
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the suggestions guys, but I need to use Java 1.3 in order to maintain backwards compatibility with an application I am maintaining.

So, I'm hoping someone has been in this situation before and managed to get it working.
 
Old 12-14-2005, 12:11 PM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I can suggest you to install a development platform under Solaris, which doesn't suffer the GNU/Linux API/ABI instability you observe.
 
Old 12-14-2005, 01:51 PM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
You might want to re-configure your default java configuration then. I wrote these for a CentOS forum but they should work for you, just modify the commands for your version of java;

This is done as root or equivalent.

First remove /var/lib/alternatives/java file by typing;

rm /var/lib/alternatives/java

When asked press the 'y' key,

Now to create the new (corrected) alternatives file for java type
the following commands as root;

/usr/sbin/alternatives --install /usr/bin/java java /usr/lib/jvm/jre-1.4.2-gcj/bin/java 1

/usr/sbin/alternatives --install /usr/bin/java java /usr/java/j2re1.5.0_06/bin/java 2

/usr/sbin/alternatives --config java

You should now see for example:

There are 2 programs which provide 'java'.

Selection Command
-----------------------------------------------
1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
*+ 2 /usr/java/j2re1.5.0_06/bin/java

Enter to keep the current selection[+], or type selection number:

Type: <choose 1 or 2>

In the example above java is already configured correctly [*+ 2] to
use Sun's Java, no changes are needed, just press the Enter key here.
If you have been following the instructions then you should have
the same results (version numbers may be sightly different).

Now type; /usr/sbin/alternatives --display java

You should see for example;

java - status is manual.
link currently points to /usr/java/j2re1.5.0_06/bin/java
/usr/lib/jvm/jre-1.4.2-gcj/bin/java - priority 1
/usr/java/j2re1.5.0_06/bin/java - priority 2
Current `best' version is /usr/java/j2re1.5.0_06/bin/java.

Next you might want to create (or edit) /etc/profile.d/java.sh
file, example below;

export JAVA_HOME="/usr/java/jre1.5.0_06/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

When done creating or editing the file type;

source /etc/profile.d/java.sh

Now any user root or other wise should be able to use the command;

which java

and the results should read something like;

/usr/java/jre1.5.0_06/bin/java

Also any user root or other wize should be able to use the command;

java -version

and the results should read something like;

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
 
Old 12-15-2005, 01:39 AM   #7
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks, but I am trying to install Java 1.3 not version 1.5. The reason I need Java 1.3 is for backwards compatibility with some old code that's been handed down to me.

Never mind though, I managed to get Fedora up and running with Java 1.3.1.

Thanks for the suggestions!

Phil
 
Old 12-16-2005, 03:44 PM   #8
borchen
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
Quote:
never mind though, I managed to get Fedora up and running with Java 1.3.1.
Could you please share your solution with us ?
 
Old 12-17-2005, 12:19 AM   #9
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Solution

Actually, I'm sorry to say there really wasn't any big resolution to the problem. I was trying to install Java 1.3.0, but couldn't get it up and running. In the end I downloaded and installed Java 1.3.1 and it worked perfectly, without any problems.

Phil
 
Old 12-20-2005, 07:43 AM   #10
taborekle
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 0
I would look at the environmental variables that control what the ldd loader looks at. LD_LIBRARY_PATH and others might just fix this problem.

Hope that helps,

Larry
 
Old 12-29-2005, 08:13 PM   #11
sonaural
LQ Newbie
 
Registered: Oct 2003
Location: Silicon Valley
Distribution: gentoo
Posts: 27

Rep: Reputation: Disabled
Quote:
Originally Posted by Lenard
You might want to re-configure your default java configuration then. <snip>

Thanks Lenard, it helped me.. at least!

brad
(I see you are in Indiana. Thanks from a fellow Hoosier!)
 
  


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
DISCUSSION: HOWTO: Install Sun's Java VM in Fedora Core 2 kevcart3 LinuxAnswers Discussion 9 10-28-2005 02:34 PM
Breezy: How to update from java 1.4.2 to sun's 1.5? kenneho Ubuntu 2 10-16-2005 06:09 AM
Sun's Java Desktop ratings? cucolin@ JDS 12 11-02-2004 09:42 AM
Sun's Java VM (HOWTO) kevcart3 Linux - Software 0 09-23-2004 05:40 AM
why Sun's Java VM sucks bandofmercy Linux - Newbie 2 12-16-2002 07:05 AM

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

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