Reputation:
I have two class file in same folder, both in same package (package hw9;). I can run them in netbeans but when I try to compile in src folder
[user@manjaro hw9]$ javac *
[user@manjaro hw9]$ java Hw9
Error: Could not find or load main class Hw9
I take this error.
Upvotes: 0
Views: 279
Reputation: 159754
Compile Hw9.java
one directory up,
javac hw9/*.java
then run
java hw9.Hw9
Upvotes: 1