Results 1 to 3 of 3

Thread: Trouble with jdk?

Hybrid View

  1. #1
    Member registered user
    Join Date
    Jun 2005
    Posts
    38

    Trouble with jdk?

    Ok, I'm using Knoppix 5.1 and everytime I try to compile a source with jdk that has import javax.swing.JOptionPane; I get an error like this:

    Code:
    Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.
            at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
            at sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
            at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
            at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:96)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at java.awt.Toolkit$2.run(Toolkit.java:821)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
            at javax.swing.UIManager.initialize(UIManager.java:1262)
            at javax.swing.UIManager.maybeInitialize(UIManager.java:1245)
            at javax.swing.UIManager.getUI(UIManager.java:851)
            at javax.swing.JOptionPane.updateUI(JOptionPane.java:1810)
            at javax.swing.JOptionPane.<init>(JOptionPane.java:1773)
            at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:831)
            at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:645)
            at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:616)
            at Welcome.main(Welcome.java:5)
    root@Me:/home/Israel/Java#
    Any suggestions?

  2. #2
    Senior Member registered user
    Join Date
    Apr 2005
    Posts
    159
    You appear to be attempting this while being logged as root. Do it instead under your regular account, from a konsole or xterm under X-xindows. Or at least issue "xhost +" to allow other accounts to access the display (eg root but anyone from any host, really, which is not advisable).

  3. #3
    Member registered user
    Join Date
    Jun 2005
    Posts
    38
    Ah... It ran with X-terminal! Thank you!

Similar Threads

  1. Sound Trouble + Modem Trouble on Knoppix 4.0
    By AJones in forum General Support
    Replies: 1
    Last Post: 01-05-2007, 07:26 PM
  2. X11 trouble
    By nirav1983 in forum Hardware & Booting
    Replies: 9
    Last Post: 10-12-2004, 06:05 PM
  3. BIG TROUBLE
    By Zidave in forum General Support
    Replies: 1
    Last Post: 02-20-2004, 03:22 PM
  4. Having trouble....
    By Enigma13 in forum General Support
    Replies: 1
    Last Post: 12-02-2003, 11:14 AM
  5. k3b trouble
    By Seeker in forum General Support
    Replies: 1
    Last Post: 09-26-2003, 09:53 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
  •  


Lenovo ThinkStation P520 Intel Xeon W-2123 3.6GHz 900W - NO RAM/ GPU/ HDD/ OS picture

Lenovo ThinkStation P520 Intel Xeon W-2123 3.6GHz 900W - NO RAM/ GPU/ HDD/ OS

$189.98



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Dell Precision T5820 950W Workstation 4.00GHz W-2125 No RAM/ GPU/ HDD/ OS picture

Dell Precision T5820 950W Workstation 4.00GHz W-2125 No RAM/ GPU/ HDD/ OS

$144.98



DELL Precision T3420 | Xeon 1240v6 | 525GB SSD |16GB RAM |Nvidia GPU |Win11 picture

DELL Precision T3420 | Xeon 1240v6 | 525GB SSD |16GB RAM |Nvidia GPU |Win11

$149.00



Intel Xeon E5-2690v2 SR1A5 10-Core 3.00GHz 25MB 130W LGA2011 CPU *km picture

Intel Xeon E5-2690v2 SR1A5 10-Core 3.00GHz 25MB 130W LGA2011 CPU *km

$11.99



Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS picture

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS

$84.49



Intel Xeon E5-2667V4 8-Core 3.20GHz SR2P5 CPU Processor *km picture

Intel Xeon E5-2667V4 8-Core 3.20GHz SR2P5 CPU Processor *km

$17.99



Intel Xeon W-2255 SRGV8 3.7GHz 10-Core LGA2066 Server CPU Processor picture

Intel Xeon W-2255 SRGV8 3.7GHz 10-Core LGA2066 Server CPU Processor

$199.99



Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS picture

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS

$179.98



Intel Xeon Processor E5-2687W V4 SR2NA 3.00GHz Broadwell 160W LGA2011 12-Core picture

Intel Xeon Processor E5-2687W V4 SR2NA 3.00GHz Broadwell 160W LGA2011 12-Core

$36.00