how to run a java package from command line code example Example: compile java code with package in cmd javac –d . demo.java