How to defined java packages, compile and run.