Link to home
Start Free TrialLog in
Avatar of piratepatrol
piratepatrolFlag for United States of America

asked on

javac not found

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
ASKER CERTIFIED SOLUTION
Avatar of arantius
arantius

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of piratepatrol

ASKER

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?
Avatar of arantius
arantius

You'll likely need "export PATH" directly after that line.  jlevie's suggestion is good too.
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.