LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 06-09-2005, 02:41 PM   #1
nr5
Member
 
Registered: Dec 2004
Posts: 65

Rep: Reputation: 15
Java SDK help!


Hello,

Just installed Java SDK (on Fedora Core 3) using the Self-Extracting Binary into /usr/local/java....
Problem is when I type "java" or "javac" on the commandline i get:

# java
bash: java: command not found
# javac
bash: javac: command not found

Not sure what to do..? If I need to add something to a file or something, please explain how (for I am a newbie on linux).

Thank you.
 
Old 06-09-2005, 02:46 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 53
You need to add /usr/local/java/bin to the path.
You can do that either in ~/.bashrc or globally in /etc/profile
 
Old 06-09-2005, 03:52 PM   #3
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Rep: Reputation: 30
or you could link the java binaries to ones in /usr/local/bin
 
Old 06-09-2005, 04:16 PM   #4
nr5
Member
 
Registered: Dec 2004
Posts: 65

Original Poster
Rep: Reputation: 15
Quote:
You can do that either in ~/.bashrc or globally in /etc/profile
Just had a look at /etc/profile and ~/.bashrc and Im not sure how to add anything in there... all i see is code "if..."...

Quote:
or you could link the java binaries to ones in /usr/local/bin
How is that done?


Thx.
 
Old 06-09-2005, 04:33 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 53
In /etc/profile find the bit that says:

PATH=...

and inside the inverted commas, add /usr/local/java/bin in exactly the same manner as all the other directories.

Changes take effect either when you log in again, or by typing:
source /etc/profile at a terminal window before trying something java related.
 
Old 06-10-2005, 08:33 AM   #6
dosnlinux
Member
 
Registered: Mar 2005
Distribution: slackware 11, arch 2007.08
Posts: 154

Rep: Reputation: 30
Quote:
Originally posted by nr5
or you could link the java binaries to ones in /usr/local/bin


How is that done?


Thx. [/B]
Code:
ln -s /javabinarypathandfilename /usr/local/bin/javabinaryfilename
I have noticed that trying to do this with a couple of java programs gives errors about missing files so you might have to make a shell script for each individual file

to do this open a text editor and type the full file path (ex. /usr/bin/javac) save the file as /usr/local/bin/progname and give it 755 permissions.

Try the first way, and if it doesn't work right changing you path might be easier, but it's up to you whatever you decide to do.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why There is no Java 2 SDK ? JOKe Debian 5 03-08-2005 02:37 PM
Java SDK Peleus Linux - Newbie 2 04-06-2004 08:31 AM
Java SDK adflynn Programming 2 02-03-2004 07:15 PM
java sdk lsansan Linux - Software 1 05-11-2003 12:58 PM
java sdk and $PATH mxr Linux - Newbie 1 10-18-2001 02:30 PM


All times are GMT -5. The time now is 08:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration