My version info:
• Tomcat 6.0.28
• Java 1.6
• Ubuntu 10.4
I have a small debugging/monitoring app written in Java/Swing that I'd like to
run inside Tomcat to help with debugging. The app is started by dynamically
loading the monitoring class from a webservice running under Tomcat. The works
in Windows (multiple flavors) but I'm having problems getting this running on
Ubuntu. What I've tried so far:
1) First error I got was an Headless exception. Since the app is a GUI app I
can't run in headless mode. After searching around I changed Tomcat's library
path (via -Djava.library.path in catalina.sh) to point to the client lib (ie.
.../java-6-sun-1.6.0.26/jre/lib/i386/client) instead of the server lib.
2) After changing the libs the next error was that DISPLAY wasn't set. After
setting DISPLAY=0.0 in catalina.sh I get "Can't connect to X11 with
DISPLAY=0.0" error. I've tried different values for DISPLAY (e.g.
localhost:0.0) and nothing makes a difference. I've also tried fiddling around
with the policies in case there's a permissions error. See below for the call
stack.
The webservice app is a simple RESTEasy implementation. Since this works in
Windows I'm assuming (perhaps erroneously) that this can work in Linux. Any
help would be appreciated.
Thanks,
DG
java . lang . InternalError : Can 't connect to X11 window server using ' : 0 .
0 ' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
java.security.AccessController.doPrivileged(Native Method)
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
java.awt.Window.init(Window.java:380)
java.awt.Window.<init>(Window.java:433)
java.awt.Frame.<init>(Frame.java:403)
java.awt.Frame.<init>(Frame.java:368)
javax.swing.JFrame.<init>(JFrame.java:158)
com.quinsoft.zeidon.objectbrowser.ObjectBrowser.startup(ObjectBrowser.java:60)