On Mon, 29 Nov 1999 18:10:16 +0000, [EMAIL PROTECTED] wrote:
>Hiya,
>
>I'm using the 1.2beta2, and when I run a Java process outside of an X
>environment, I get the following error:
I do this all the time but you have to be careful as to what code you
run. If it does anything graphics related (such as images or swing or
user input) then you will need X.
>java.lang.reflect.InvocationTargetException: 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
>sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Class.java:124)
>at
>java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:63)
>at java.awt.Font.initializeFont(Font.java:259)
>at java.awt.Font.<init>(Font.java:289)
>at
>javax.swing.plaf.metal.DefaultMetalTheme.<init>(DefaultMetalTheme.java:59)
>at
>javax.swing.plaf.metal.MetalLookAndFeel.createDefaultTheme(MetalLookAndFeel.java:654)
>at
>javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:658)
>at javax.swing.UIManager.setLookAndFeel(UIManager.java:339)
>at javax.swing.UIManager.setLookAndFeel(UIManager.java:366)
>at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:820)
>at javax.swing.UIManager.initialize(UIManager.java:896)
>at javax.swing.UIManager.maybeInitialize(UIManager.java:913)
>at javax.swing.UIManager.getUI(UIManager.java:535)
>at javax.swing.JScrollBar.updateUI(JScrollBar.java:192)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:143)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:158)
>
>
>Now I realise this is because Im not running X, and it occurs when I create
>a JSliderBar (I need to create many components on this backend service, so I
>cant work around it). Is this a known problem?
Why are you creating a JSliderBar? This is a GUI item and if you are
a service (non-GUI) I don't know where that component would be useful.
Anyway, if you really need to create such an object you will need some form
of X environment, even if it is a simple frame buffer (such as Xvfb)
--
Michael Sinz ---- Technology and Engineering Director/Consultant
"Starting Startups" mailto:[EMAIL PROTECTED]
My place on the web ---> http://www.users.fast.net/~michael_sinz
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]