java
I am trying to compile a Java program using my vi (terminal window) but is telling me that the javac or the java command is not found, what can I do to fix this problem?
Thanks, Grace |
probably you haven't installed the java compiler.
run #rpm -aq | grep "java" to make sure that is not installed. |
I believe this is a path issue. You may need to add javac and java to your path. This process differs depending on your shell and the location of the jdk install, but if you are using bash or sh derived shell try this.
export PATH=$PATH:/path/to/java/bin/dir This all assumes you have java installed, wise guy question but had to ask. To make this change permanent you will need to edit one of the following files and add the above line/or edit a similar line already in the file. ~/.bash_profile~/.bashrc~/.profileYou may also want to export a CLASSPATH variable to include "." thats dot aka current working directory. export CLASSPATH="." |
I try what you recommended but still (run #rpm -aq | grep "java") did nothing, key in java filename and replied -
bash: javac: command not found |
I think, I know what I need to do now, thanks.
|
why dont u share the knowledge mate????
:confused: :confused: :confused: :confused: :confused: :newbie: |
All times are GMT -5. The time now is 08:34 AM. |