I have 2 java program located seperately One in c:\test and the other in c:\test\new
I can compile both of it without any error \javac
But when i try to execute the file \java it shows the error like this
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at ButtonFrame.makeButton(ButtonTest3.java:42)
at ButtonFrame.<init>(ButtonTest3.java:29)
at ButtonTest$1.run(ButtonTest.java:17)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
i put this in my classpath
CLASSPATH value- C:\test;C:\test\new
but if i change the order of the value in CLASSPATH to this
CLASSPATH value- C:\test\new;C:\test
the error is simply gone
Why?? this could happening Only the order matters?