URGENT help for java.awt.HeadLessException

6 views
Skip to first unread message

arti vachhani

unread,
Apr 9, 2010, 4:59:40 AM4/9/10
to open-traini...@googlegroups.com
Hi,
        I have developed one swing component for chat client.

        I am calling this component from jsp , & this jsp i deploy in zimbra desktop,

           but when i start zimbra desktop it give me below error


java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(Unknown Source)
at com.chat.ChatF.createPanel(ChatF.java:272)

i include following code in my java file
System.setProperty("java.awt.headless", "true"); //to enable headless mode

GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
     GraphicsDevice gd = ge.getDefaultScreenDevice();
   
    jframe1 = new JFrame(gd.getDefaultConfiguration());

please help me its very urgent
Reply all
Reply to author
Forward
0 new messages