Well, first off I'm going to suggest you use
Ant to do your compiling. It makes like very easy. But we'll assume you're trying to learn the jdk tools because you don't have Ant (or you're just into pain).
Let's do a little setup first (this is optional but the way I like to do it).
Create a
src and
bin folder (if you have jars then a
lib folder is a good idea).
Create your package folder
mypack in the
src folder. Then create your java files src\mypack\Packed.java and src\Importer.java
OK, now we have our project structure organized and ready to compile.
from the comand line (assuming we're in the project root):
To compile the files (this way gets really ugly with many files/packages but works for this):
javac -d bin src\mypack\Packed.java src\Importer.java
Then to run our program:
java -classpath bin Importer.java
Here's a link with a strategy for compiling multiple files and packages:
http://www.yoda.arachsys.com/java/packages.html