While working on my previous problem,
http://stackoverflow.com/questions/950636/java-jar-class-not-found-exception
I noticed something odd. the class that can not be found is referenced from main. Now if i try to create an instance of the class like
SysTray tray = new SysTray();
i get a class not found exception when i try to run the application but if i create it like
static SysTray tray = new SysTray();
it gets loaded no problems are reported.
I was wondering if anyone know why is this?
This should have nothing to do with class path because there are no external depencies and application is contained in a jar.