Please - use Eclipse to develop and deploy your Java App(It's Freeware and simple). You should make it a
runnable jar - that is a difference from a simple
archive jar.
anonymous classes are ok, also it's not a recommended workaround. You should extract them and make it a proper development.
EDIT: Think about adding some logging to the jar, log4j is a simple logging tool and can save you time & work & nerves.
How to execute the jar[
^]
If you still resist to use Eclipse (strongly recommended to be used!!!)[
^]