Hello Praveen,
And the option -Djava.awt.headless=true works correctly in sun JRE but not with jamvm+classpath.
The headless toolkit is a recent addition to Classpath and is still somewhat incomplete... I believe we currently ignore the awt.headless setting when the GTK toolkit is available, as our headless is in worse shape than gtk.
Any idea to make it work would good.
I believe you can use the option -Dawt.toolkit=gnu.java.awt.peer.headless.HeadlessToolkit to force use of the headless toolkit.
If that doesn't work, try passing --disable-gtk-peer in when you configure; that will disable building of the gtk peers altogether.
I've also heard that xvfb works quite well with Classpath (and uses the GTK toolkit, which is less buggy than headless).
Cheers, Francis