Unknown exception

I am getting the following exception from time to time in my application

can anyone tell me what mihgt cause it, and how could it be avoided

Thanks in advance

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

at sun.awt.Win32GraphicsEnvironment.displayChanged(Unknown Source)

at sun.awt.windows.WToolkit$4.run(Unknown Source)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

[851 byte] By [koko191a] at [2007-11-26 19:03:48]
# 1
This look likes it is coming from your gui? Could you post the relavent code?
zadoka at 2007-7-9 20:51:19 > top of Java-index,Java Essentials,Java Programming...
# 2
Thanks for answering .. Well the code is huge, so i can't post it here, but we actually don't have a GUI. this is a command line application.Maybe i've added a GUI related packages ? any ideas ?
koko191a at 2007-7-9 20:51:19 > top of Java-index,Java Essentials,Java Programming...
# 3
A command-line application, and yet java.awt is involved? You're doing something very weird.
warnerjaa at 2007-7-9 20:51:19 > top of Java-index,Java Essentials,Java Programming...
# 4

> Thanks for answering .. Well the code is huge, so i

> can't post it here, but we actually don't have a GUI.

> this is a command line application.

> Maybe i've added a GUI related packages ? any ideas ?

At least post the line of code that is throwing it and some of the surrounding lines.

zadoka at 2007-7-9 20:51:19 > top of Java-index,Java Essentials,Java Programming...
# 5
I don't know which line of code throws this.. i am not including java.awt in the my code.. couldn't find it anywhere now java.* include either.What can i do ?
koko191a at 2007-7-9 20:51:20 > top of Java-index,Java Essentials,Java Programming...
# 6
> I don't know which line of code throws this.. i am> not including java.awt in the my code.. couldn't find> it anywhere now java.* include either.> What can i do ?Put printlns throughout your code till you find it then.
zadoka at 2007-7-9 20:51:20 > top of Java-index,Java Essentials,Java Programming...