using the command line i have no problem compiling and executing simple java classes. at first i had a problem with using the package statement but read online somewhere that if i compiled a source file inside a directory with the same name as the package statement name it would compile. i tried this and it works fine, the compiled class file materializing in the same directory as the source file. so far ok. however, when i try to execute the class file from the command line i get the no class def found error message. any classes i have created without package statements are easy to execute. only the presence of the package statement in the source file from which the class file is compiled causes the abort with error message.
Just a suggestion - this is what I do for thick clients.
Package your software in a Jar, make sure your manifest file states what your Main-class is.
Then you can execute it by:
java -jar MyProgram.jar
You may want to learn basics of build tools such as Ant and Maven. Ant is easier to learn IMO - so if you're starting out use that to compile and package your Software.