• Post Reply Bookmark Topic Watch Topic
  • New Topic

need help with java installation on linux  RSS feed

 
juliane gross
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have Linux Suse 8.1 and did successfully download a recent Java version.
I installed it successfully in /usr/java/
But everytime I try to compile my file Test.java,
I get this message:
bash: javac: command not found
Probably some PATH variable is showing to some distant & foreign place;
How can I find out, which file my Linux edition is using for PATH variables?
Which commands are necessary for directing this thing to my desired directory,
or is there something else to know which escaped me so far?
Any help is much apreciated, thank you!
Juliane
 
Mike
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open the "profile"// in etc directory
#1 vim /etc/profile //as root
#2 add the path:
PATH=/usr/java/j2sdk1.4.0_01/bin:$PATH
Instead j2sdk1.4.0_01 enter the correct version..
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you'll probably need JAVA_HOME as well. In fact the easiest way to add it to your environment is so:
JAVA_HOME=/path/to/java
PATH=$PATH:$JAVA_HOME/bin
where /path/to/java is normally something like /usr/java/j2sdk1.4.1_01
Assuming you're executing javac at the command line. Might be different if you're running an IDE
 
juliane gross
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much, Mike and Adam, for your replies.
Adam, with your tip it worked IMMEDIATELY!

I am very glad.
Where should I sent this chocolate to?
thanks again,
Juliane
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!