-
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?
-
Senior Member
registered user
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).
-
Ah... It ran with X-terminal! Thank you!
Similar Threads
-
By AJones in forum General Support
Replies: 1
Last Post: 01-05-2007, 07:26 PM
-
By nirav1983 in forum Hardware & Booting
Replies: 9
Last Post: 10-12-2004, 06:05 PM
-
By Zidave in forum General Support
Replies: 1
Last Post: 02-20-2004, 03:22 PM
-
By Enigma13 in forum General Support
Replies: 1
Last Post: 12-02-2003, 11:14 AM
-
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
-
Forum Rules

VINTAGE Apple 3.5 Drive External 3½" Floppy Drive DB-19 Beige | P/N A9M0106
$159.00

Vintage Apple Color RGB Color Monitor A2M6014. Used.
$199.99

VINTAGE Apple 3.5 Drive External 3½" Floppy Drive DB-19 Beige | P/N A9M0106
$159.00

Vintage Apple Keyboard II M0487 Vintage Mac ADB Keyboard 1990 Malaysia
$32.40

Vintage Apple USB Mouse M4848 Bondi Blue iMac G3 Hockey Puck - Tested Working
$22.99

Vintage Apple Computer Macintosh Rainbow Logo Decal Stickers – 4 Sheets of 4
$99.99

Vintage Apple USB Mouse M4848 Lime Green iMac G3 Hockey Puck - Tested Working
$59.99

Apple Computer cards Super Serial SCSI AST -Orange Micro ++ Vintage 1980's
$169.00

Vintage Apple Multiple Scan 15av Display Monitor M4681
$299.99

Apple iMac G3 Blueberry M5521 CRT Desktop Vintage Bondi Blue **PLEASE READ**
$199.99