java compile/execute error
Hello,
I am having trouble with my first :) java program. Code:
[me@horse javahello]$ java -version code is: Code:
class myfirstjavaprog Compile and run: Code:
[me@horse javahello]$ javac myfirstjavaprog.java |
Not sure. I just copied your source code and pasted it into my environment. It compiled and ran with no problems.
Code:
[sam@stealth java_compile]$ javac myfirstjavaprog.java Code:
class myfirstjavaprog Code:
echo $JAVA_OPTS |
Searching on the net, it say some thing about using rule from one version and compiling or executing for an other version.
I think I carelessly tried to install jdk from sun(oracle) website, when I could not find command javac. Code:
[me@horse ~]$ echo $JAVA_OPTS Thanks for your help. |
Remove both of them and then install one of them.
Code:
$ java -version |
All times are GMT -5. The time now is 05:45 PM. |