Did you save the java file in the right directory? Also have you set the classpath and stuff like that?
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
What I really meant was that did you open the directory where the program was saved before trying to compile.
Example:
If you saved the program in C:/javawork
but if you are at the command line and and it says C:/documents and settings....blah blah it wont compile because thats not were the file was saved.
If you try to do this you'll get an error that says: error cannot read: Example.java
1 error
Im sure this is your problem because your error message is the same as above.
To fix this you need to:
at the command line type in: cd \DirectoryWereYouSavedTheJavaProgram
Then try to compile, and that should fix all your problems.
You posted that you tried this: C:\Documents and Settings\Owner>javac Hello.java
This is saying that your program is saved in C:\Documents and Settings\Owner but i dont know if you save your programs there or not.
I hope I was able to explain this good enough, I know it sounds confusing.
If the problem persists or if you are unclear on directions let me know.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
System.out.print("Hello you");
I believe what you want is println() and not print()
he shouldn't have to set the classpath, as i believe it's done when the sdk is installed.
Phaelax
Practically a Posting Shark
858 posts since Mar 2004
Reputation Points: 92
Solved Threads: 51
System.out.print("Hello you");
I believe what you want is println() and not print()
he shouldn't have to set the classpath, as i believe it's done when the sdk is installed.
Since he's only got one line to print it won't make a diffrence if he uses print() over println().
Also I had to manually set the classpath when I installed the sdk, so it cant always be set correctly when its installed.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20