He has already set his PATH environment variable, so he has no need to fiddle around with JAVA_HOME etc etc.

I'd guess that what you said first i correct, of course the class must also be public,...