LinuxQuestions.org
Visit Jeremy's Blog.
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 05-28-2004, 12:22 PM   #1
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Rep: Reputation: 15
Sun Java


After some work, I finally managed to get Sun's J2SE 1.4.2_04 SDK installed. When I went to run Eclipse, I recieved an error that stated that a virtual machine could not be found in the ~/eclipse3.0M8/java/jre/bin directory or in the PATH.

After searching the boards, I ran across a thread that said that you should add the export statements to the /etc/rc.local script. I followed that advice and my /etc/rc.local file now reads:
Code:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initilizatoin stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
export PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
export PATH=$PATH:/usr/java/j2sdk1.4.2_04/jre/bin
I then logged out and back in. In the terminal I checked the contents of the PATH variable. The output was:
Code:
/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/X11R6/bin
Then I tryed rebooting my computer. When I checked the contents of the PATH variable, I got the exact same output. Why isn't my PATH variable being changed?
 
Old 05-28-2004, 01:33 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Try making a little symbolic link instead:

ln -s /usr/java/j2sdk1.4.2_04/jre/bin /home/user/eclipse3.0M8/java/jre/

and see if that would work
 
Old 05-28-2004, 03:07 PM   #3
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Original Poster
Rep: Reputation: 15
I tryed making the symbolic link as you specified, but I kept getting an error message about the file or folder not being found. I tryed su, but was unsuccessful in that too.

I then tryed to put the PATH declerations in the profile file
Code:
USER=......
LOGIN=.....
MAIL=......
PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
PATH=$PATH:/usr/java/j2sdk1.4.2_04/jre/bin

export PATH USER LOGIN MAIL........
(The elipses (...) are included since I did not take down the full text of the file.)

Then I logged out and back in and checked PATH, but it was unchanged. I then rebooted the computer and loged in and checked PATH, but it was still unchanged.
 
Old 05-29-2004, 07:10 AM   #4
heinblöd
Member
 
Registered: May 2004
Location: France
Distribution: Slackware Gentoo
Posts: 186

Rep: Reputation: 31
Did you check , if your rc.profile is executable or used at system start-up.
Do you have other things in there which work??

And which file is not found ?? Maybe some directory on a partition which was not mounted ??

Last edited by heinblöd; 05-29-2004 at 07:12 AM.
 
Old 05-29-2004, 11:20 AM   #5
Ironica
Member
 
Registered: Jan 2003
Distribution: LFS
Posts: 64

Rep: Reputation: 15
Which distro?
When I want to add a new directory to my PATH, I edit /etc/profile, not /etc/rc.local.
 
Old 05-29-2004, 05:35 PM   #6
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Original Poster
Rep: Reputation: 15
First, I am using FC 2. Second, I noticed that I had changed the KDE Konsole to use csh instead of bash (Stupid!). Anyway, I tried editing the csh.cshrc file by adding
Code:
setenv PATH $PATH:/usr/java/j2sdk1.4.2_04/bin
setenv PATH $PATH:/usr/java/j2sdk1.4.2_04/jre/bin
Now whenever csh is started I gat an error message in the Konsole that says that there is an illegal operator (/). I have tried using parenthesis and the semicolon at the end of the line and using quotation marks, but none of them fix the error, and if anything, create new errors.

I have tried editing /etc/profile, but it seems to have no effect.

BTW, is there an easy way to check if my fix has worked without logging out and back in again or rebooting my computer? Does just typing csh at the prompt or changing to another shell and then bask to csh work?

Last edited by confidential007; 05-30-2004 at 12:44 PM.
 
Old 05-30-2004, 12:47 PM   #7
confidential007
Member
 
Registered: May 2004
Location: Ohio, USA
Distribution: Red Hat Linux, Fedora Core, Knoppix, tomsrtbt
Posts: 37

Original Poster
Rep: Reputation: 15
OK, problem solved. First, I changed by default shell to bash instead of csh. Second, I added the following to the ~/.bash_profile
Code:
PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
PATH=$PATH:/usr/java/j2sdk1.4.2_04/jre/bin
I added this before the export PATH statement. Now whenever bash starts, my PATH is updated so I can use java.
 
  


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
Sun Java not GCJ untwisted Linux - Software 6 06-16-2005 04:18 PM
www.java.sun.com wildcat22 General 17 03-04-2004 08:02 PM
Sun Microsystems Java mike35 Linux - Newbie 1 10-13-2003 11:44 PM
sun Java xdan64 Linux - Newbie 3 09-05-2003 07:14 AM
get mozzila to use sun java VM qwijibow Linux - Newbie 4 06-21-2003 11:15 PM

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

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