We help IT Professionals succeed at work.

javac not found

piratepatrol
piratepatrol asked
on
1,706 Views
Last Modified: 2008-03-03
Hi everyone,

I installed the Java SDK on my Fedora, but I have to enter

/usr/java/j2sdk1.4.2_06/bin/javac HelloWorld.java
/usr/java/j2sdk1.4.2_06/bin/java HelloWorld.java

to compile and run my program.

How can I get the computer to recognize javac and java without having to type their paths everytime I compile and run?

Thank you so much,


Jazon from Jacksonville, FL
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Top Expert 2005
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I appended

PATH=${PATH}:/usr/java/j2sdk1.4.2_06/bin

to the .bashrc file, restarted the computer, and still javac is not recognized.  Am I supposed to do something else?

Commented:
You'll likely need "export PATH" directly after that line.  jlevie's suggestion is good too.

Author

Commented:
My bad, Arantius.  I had

PATH=${PATH}:/usr/jave/j2sdk1.4.2_06/bin

Notice the "jave".  Sorry about that.  It works just fine without the export.

Thanks, everyone.  I'm giving you guys 100 points each.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.