How to run a .class file that is part of a package from cmd?

Suppose you did cd C:/projects and HelloWorld.class is in C:/projects/com, then just type:

java com.HelloWorld

Leave a Comment