my code:
class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
when i save it as a .java file, then cd Desktop, then javac it, it makes the class file and puts it on my desktop, and then when I attempted to java it, i get:
Error: Could not find or load main class Main
I've tried to add .class to it, but i still get the same error.
Would it be because of the path? Would it be because of something with my environment variables?