LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   java (https://www.linuxquestions.org/questions/linux-newbie-8/java-151544/)

getbc 02-28-2004 09:55 AM

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

dominant 02-28-2004 10:07 AM

probably you haven't installed the java compiler.

run #rpm -aq | grep "java"
to make sure that is not installed.

mhiggins 02-28-2004 10:27 AM

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="."

getbc 02-28-2004 10:34 AM

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

getbc 02-28-2004 10:51 AM

I think, I know what I need to do now, thanks.

realtowz 06-02-2004 04:59 PM

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.