Swing jar application does not load on remote Solaris/Linux machine

I am logging onto a remote server where I am trying to put my swing application packed in a jar file named Rajiv.jar

bash-3.00# java -jar Rajiv.jar

Java Accessibility Bridge for GNOME loaded.

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException:

No X11 DISPLAY variable was set, but this program performed an operation which requires it.

at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)

at java.awt.Window.<init>(Window.java:317)

at java.awt.Frame.<init>(Frame.java:419)

at javax.swing.JFrame.<init>(JFrame.java:194)

at viewer.Viewer.<init>(Viewer.java:55)

at viewer.NetWatcher$1.run(NetWatcher.java:25)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

bash-3.00#

On my local machine it runs fine. What could be the problem?

Thanks,

Rajiv

[1397 byte] By [toxiga] at [2007-11-27 6:45:31]
# 1

Kind of taking a stab in the dark here but I'm guessing that you're running Linux, and the server you're logging into doesn't have X11 installed. Here's some quick information on X11 which I have not perused with any depth.

http://www.google.com/search?hl=en&q=Linux+%2B+X11

Essentially you're asking the server to do something graphical and it doesn't know how.

PS.

puckstopper31a at 2007-7-12 18:17:24 > top of Java-index,Java Essentials,Java Programming...
# 2
If you want to run the GUI from the remote machine, you need to have set the DISPLAY variable properly and possibly fiddle with all sorts of X11Forwarding.Nothing special here, running any GUI software would fail if the DISPLAY variable isn't set.
-Kayaman-a at 2007-7-12 18:17:24 > top of Java-index,Java Essentials,Java Programming...