http://gyazo.com/6261ef799ab4505d12b25378abfc958a.png
I keep getting that error but I see the freaking file on my desktop, the thing must be blind.
Printable View
http://gyazo.com/6261ef799ab4505d12b25378abfc958a.png
I keep getting that error but I see the freaking file on my desktop, the thing must be blind.
Remove the '.class' suffix when you try to run your class file.
kind regards,
Jos
I did it without the .class suffix the first time.
Show us the source code for that class; in general you have to do this:
If your class lives in a package you have to mention the package name as well if you want to run it.Code:javac YourClass.java
java YourClass
kind regards,
Jos
Just a guess: can you try the same outside of that Desktop directory? If that fails as well, please show the source code for your HelloWorld class (i.e. the .java file).
kind regards,
Jos
You could also try
If you have a CLASSPATH variable set it will override the default behaviour (look for classes in the current directory) unless you explicitly use dash-c-p-space-dot. Unless other software is using it, you should remove the CLASSPATH environment variable.Code:C:\Users\Lenovo\Desktop>javac -cp . HelloWorld.java
C:\Users\Lenovo\Desktop>java -cp . HelloWorld
You're welcome.