LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2003, 03:57 AM   #1
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Rep: Reputation: 15
Question Program not finding java VM libraries


I have installed Java 2 Runtime Environment version 1.4.2 on 2 systems and have met the same difficulties. I can get the Mozilla plugin to work easily, also I can install J2RE and use the GUI program when viewing java programs. However the problem that plagues me is installing other programs dependent on J2RE libraries (Java was installed in the directory /usr/java/j2re1.4.2_01 all the binaries and libraries are within just as they should be). For example, if I wanted to install Lime Wire for Linux (which requires J2RE) I will get a message stating that the installer cannot find my Java Virtual Machine. I have tried placing hard links to the 'java' and 'java_vm' binaries in the /usr/java/j2re1.4.2_01/bin/ directory from the directory where I would think the java installer would search for the binary, '/usr/bin/'. Once done I have had better results, the installer will extract its installation resources and configure itself for my system's environment, however once it begins to launch the installer program itself, an error occurs. It reports that the installer cannot find libjava.so and the Java 2 Runtime Environment. I later tried to place both a sym link and a hard link of libjava.so in both /usr/lib/ and /lib/ with no success and me out of ideas, I have given up for the time being.
I know that I am probably making a common mistake for early users to Linux, any suggestions would be highly appreciated.
 
Old 09-03-2003, 06:29 AM   #2
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Something to try would be to make an entry in /etc/ld.so.conf for the location of your unfound libraries, and then invoking (as root):
ldconfig

See the ldconfig man page for details.
 
Old 09-03-2003, 04:42 PM   #3
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
that seemed promising

I have tried placing the directory /usr/java/j2re1.4.2/lib in my /etc/ld.so.conf file and executed as root ldconf with no success. Well, better said, I had success doing these things however the program installer still does not find the libjava.so file. Which seems strange because when I execute ldconf -v and view which libraries it is searching for, libjava.so exists in this list of libraries. Is it necessary to list the binary directory of java in some file too? What kind of link would be appropriate if I have to link the binaries (symbolic or hard) and does it matter which binary directory I link them to? Thank you in advance!
 
Old 09-03-2003, 07:36 PM   #4
Looking_Lost
Senior Member
 
Registered: Apr 2003
Location: Eire
Distribution: Slackware 12.0, OpenSuse 10.3
Posts: 1,120

Rep: Reputation: 45
A lot of programs will look for the JAVA_HOME environment variable to work out where it is

Add

JAVA_HOME=complete_path_to_java_runtime_directory

export JAVA_HOME

to an appropriate file such as

/etc/profile

or your .bash_profile

logout and back in and see if it helps

if that don't work add the java /bin directory to your path but unless you're using the sdk most of the time the first way works
 
Old 09-03-2003, 10:27 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
You also should put the /usr/java/yadayadaJRE in your PATH. You can do that either in your .bashrc or you /etc/profile. You can use a line like

PATH = $PATH:/usr/java/jre_directory
export PATH
 
Old 09-04-2003, 01:20 AM   #6
gtanghookup
LQ Newbie
 
Registered: Sep 2003
Location: Portland, Oregon
Distribution: Debian and Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
Changing the PATH variable worked, thank you very much for your assistance!
 
  


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
./configure not finding KDE libraries MadCowDzz SUSE / openSUSE 3 11-21-2005 06:49 AM
handy perl script for finding libraries TheLinuxDuck Programming 0 03-22-2005 03:38 PM
finding libraries [gaim installation] LordFrancis Linux - Newbie 4 10-05-2004 09:18 AM
Finding and Linking Static Libraries with gcc neorich Programming 15 08-10-2003 04:03 PM
Help finding libraries biggiefatts Linux - Software 1 11-19-2002 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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