6 Replies Latest reply on Nov 2, 2002 5:43 AM by 807593

    urgent need help

    807593
      I am writing a program to implement a B+ tree GUI interface. All the classes are compiling but when try to run my main class btview i am getting the following error. i am new to java,could any body explain as to whats going wrong??

      thanks
      sagarika

      Exception in thread "main" 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.forName(Class.java:124)
      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:63)
      at <Unloaded Method>
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:124)
      at java.awt.Toolkit$2.run(Toolkit.java:499)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492)
      at java.awt.Window.getToolkit(Window.java:432)
      at nodeContent.<init>(nodeContent.java:54)
      at btview.main(btview.java:25)
        • 1. Re: urgent need help
          807593
          sorry dude. I'm new to java too. Just want to comfort you by letting you know that ppl. are actually looking at this :) sorry I kan't help.
          • 2. Re: urgent need help
            807593
            sorry dude. I'm new to java too. Just want to comfort you by letting you know that ppl. are actually looking at this :) sorry I kan't help.

            ~ Nesho100

            P.S. you might try assigning some duke dollars to it. add a little motivation.
            • 3. Re: urgent need help
              807593
              sorry dude. I'm new to java too. Just want to comfort you by letting you know that ppl. are actually looking at this :) sorry I kan't help.

              ~ Nesho100

              P.S. you might try assigning some duke dollars to it. add a little motivation.
              • 4. Re: urgent need help
                807593

                This looks like you haven't set up X11 right, or aren't using it right.
                Can you run ANY X11 programs? Are you sure your X11 server is running?
                Is your DISPLAY variable set right? etc.
                • 5. Re: urgent need help
                  807593
                  Thanks for all the resposes!!

                  I found out from a previous post that Java needs a X server when doing graphics under Unix/Linux.

                  so i need to start an X server where the user that start your application has access (try the command xhost +).

                  or

                  start the Xvfb server (virtual framebuffer) if you use
                  graphics only for image manipulation (in servlets for example).


                  -sagarika
                  • 6. Re: urgent need help
                    807593

                    You only need X11 if you're doing something graphical. For example, you could run a web server with a servlet engine on unix, without an X11 server running.

                    There may also be other graphical support for java on unix or linux (maybe something linked to svgalib?), but if so I haven't heard about it. It would be cool though.