Error: Could not find or load main class zoo
So, I was trying to break out of my
IDE shell and use the command line...
I wrote the following zoo.java file:
**************************************
**************************************
(Super advanced, I know... lol)
and saved that to C:\Users\Admin\Desktop\testjava\zoo.java
I open the command prompt, browse to the testjava directory and compile:
javac zoo.java
(I have also tried: javac -cp . zoo.java)
Both of which generate the zoo.class file. Then I try to run:
java zoo
(I have also tried java zoo.class)
and get the following error:
Error: Could not find or load main class zoo
Echoing %classpath% I get:
%classpath%
Which, correct me if I am wrong, means it is unset, and will default to the current directory.
I did some Google'ing and tried some different things, such as setting the classpath variable to the JRE install and pointing directly to the rt.jar (did not work).
I have since reset/cleared the value of classpath so it is back to default.
What am I missing?