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 07-06-2004, 03:05 PM   #1
confuzzled
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Rep: Reputation: 0
javac rehadt 9.0


hi!
just wondering if anybody would know where i can download an install to put javac on my redhat 9.0 i checked rpmfind.net but dont think i could find one anywhere! thanks a lot!
 
Old 07-06-2004, 07:30 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
http://java.sun.com

--Ian
 
Old 07-07-2004, 11:08 PM   #3
confuzzled
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
hi! so i installed the javac compiler from the sun website except now i dont know how to change that whole path thing... i tried to read up on the other posts which mentioned stuff about how i should change my profile etc... but whenver i type in ~/.bash_profile from root, it tells me that "permission is denied" .. so i'm not exactly sure how to change my profile and what i should put in my profile in order to change it so that javac compiler will work! thansk a lot!
 
Old 07-08-2004, 12:43 AM   #4
imonfya
Member
 
Registered: Jun 2004
Location: Virginia, USA
Distribution: Ubuntu 10
Posts: 47

Rep: Reputation: 15
I'm new at RH 9 too and I had to put Javac.

I just went to terminal switched to the superuser ("su" at command prompt) then edited ("gedit" at command) the /etc/ld.so.conf and I add the location of my JDK directory. And to edit the bash.profile file I think you have the change the permissions to it, but I'm not sure.
 
Old 07-08-2004, 02:36 AM   #5
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
To edit .bash_profile, simply enter (as a normal user):
Code:
vi ~/.bash_profile
and add the line
Code:
PATH=/usr/local/java/bin:$PATH
export PATH
now type
Code:
source .bash_profile
and type "java" to see if it is installed.

imonfya, why edit /etc/ld.so.conf ?? I don't think you need to do that to install java, at least I never have.

I hope this helps
--Ian
 
Old 07-08-2004, 01:16 PM   #6
imonfya
Member
 
Registered: Jun 2004
Location: Virginia, USA
Distribution: Ubuntu 10
Posts: 47

Rep: Reputation: 15
I did it because I couldn't run javac from any directory, and when I added it in there it worked fine. I guess LOL
 
Old 07-13-2004, 11:40 PM   #7
confuzzled
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
hey! i tried that code above, but it still didnt work for me....

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PATH=/usr/local/java/bin:$PATH

export PATH
export PATH
unset USERNAME

i'm not sure if i'm doing something wrong.... at first i tried only one export PATH but it didnt work so then i added the second above export PATH as shown.... but that didnt work either... so i'm not exactly sure whats going on... thanks a bunch again!
 
Old 07-14-2004, 01:24 AM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Sorry, I forgot that you need to set the JAVA_HOME variable as well.

In your .bash_profile add:
JAVA_HOME=/usr/local/java
export JAVA_HOME

and source .bash_profile again, and it (hopefully) should work

I hope this helps
--Ian
 
Old 07-14-2004, 03:51 AM   #9
BluePyre
Member
 
Registered: Mar 2004
Location: London
Distribution: Mandrake 10
Posts: 172

Rep: Reputation: 30
I'm pretty sure that the rpm doesn't install itself to there, unless it adds some kind of symlink i'm not aware of. My .bashrc file in my home directory is something like:

PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin

Close the terminal then open it again and it should work.
Works fine for me at least.
 
Old 07-20-2004, 05:46 PM   #10
confuzzled
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
hi!
ahhh i'm really sorry, but it still isnt working for me... :/ so there definately must be something i am doing wrong.... :/ i tried both alternatives above but neither worked for me.... below is the second alternative that i tried.... the other was just using PATH=/usr/local/java/bin:$PATH instead of the PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin line... ahhh thanks again!!!

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
JAVA_HOME=/usr/local/java
export JAVA_HOME

export PATH
export PATH
unset USERNAME
 
Old 07-20-2004, 09:21 PM   #11
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Where have you installed java to??

You need:
Code:
PATH=pathToJava/bin:$PATH
JAVA_HOME=pathToJava
In my above post, I said /usr/local/java, as that is where I have installed java. Sorry about the confusion...

--Ian
 
Old 07-21-2004, 01:08 AM   #12
confuzzled
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Original Poster
Rep: Reputation: 0
hey!
no need to apologise... its my fault for not knowing any of this ... :/
but now it worked! thanks a lot for your help!!!
 
  


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
javac and jikes tuxulux Linux - Newbie 3 01-23-2005 07:38 PM
javac not working nedian123 Programming 1 12-15-2004 10:19 AM
javac zaicheke Programming 2 10-05-2004 10:46 PM
javac linuxRules Linux - General 3 05-23-2002 07:45 AM
javac linuxRules Linux - General 0 05-21-2002 09:15 AM

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

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