Results 1 to 2 of 2
  1. #1
    shafi2all is offline Member
    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    0

    Default Do not want to set DISPLAY and run X11 window server

    I have a batch programme which will load the Spreadsheet into database..

    When the DISPLAY is set and X11 window server is running, there is no issue in reading the spreadsheet and loading into database without lauching UI.

    But if the display is not set, then there is an issue... Any ideas over this ?? Why does a batch programme requires DISPLAY and X11 window server to be set when there is no need of UI to launch....

    Code pasted below :

    24 public class Spreadsheet extends com.f1j.swing.JBook
    25 {
    26 private int failedSheetNum = 0;
    27
    28 public Spreadsheet()
    29 {
    30 super();
    31 setup();
    32 }


    Exception is thrown at line 30 :

    Exception in thread "main" Logging starts at 15/7/2009 10:52:16
    Loading the XML...
    This might take a few seconds.Please wait...
    Loading the Mapping template...
    Loading the input data file...
    This might take a few seconds.Please wait...
    java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at <Unloaded Method>
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName0(Compiled Code)
    at java.lang.Class.forName(Compiled Code)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvir onment(GraphicsEnvironment.java:56)
    at <Unloaded Method>
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName0(Compiled Code)
    at java.lang.Class.forName(Compiled Code)
    at java.awt.Toolkit$2.run(Toolkit.java:492)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:48 5)
    at java.awt.SystemColor.updateSystemColors(SystemColo r.java:339)
    at <Unloaded Method>
    at java.awt.Insets.initIDs(Compiled Code)
    at com.f1j.swing.JBook.<init>(DashoA8533)
    at com.f1j.swing.JBook.<init>(DashoA8533)
    at gdm.ssl.Spreadsheet.<init>(Spreadsheet.java:30)

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    Well, your Spreadsheet class is in a Swing UI package. I suspect Spreadsheet has UI components that need to find a Display, even if you aren't using them.

    So, the problem is with the Spreadsheet class. Is there something similar that doesn't have UI hooks?

Similar Threads

  1. change url in parent window from child window
    By rakesh_n_mehta in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-09-2009, 01:17 PM
  2. how can i move one frame window to another window
    By santhosh_el in forum AWT / Swing
    Replies: 8
    Last Post: 06-10-2009, 04:36 PM
  3. Replies: 2
    Last Post: 04-06-2009, 06:52 PM
  4. i want to display decimal values in frame window
    By santhosh_el in forum AWT / Swing
    Replies: 4
    Last Post: 03-16-2009, 10:07 AM
  5. Replies: 1
    Last Post: 08-08-2008, 04:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •