I have written a simple package program:
//A simple package
package MyPack
class Balance
{
String name;
doubl
Try to create the folder named MyPack and move .class files in it or use following command line to compile the java code and it moves the .class files into MyPack folder.
javac YourFileName.java -d .
and run using,
java MyPack.AccountBalance
Have a look at javac tool
From the tool doc : By default, the compiler puts each class file in the same directory as its source file. You can specify a separate destination directory with -d (see Options, below).
and package tutorial.