|
|
Java GUI deployment on Unix / Linux
I am just about finished with my first java application, and am in the
process of testing the deployment on a windows box as well as a UNIX box. I
have research / have created an executable jar file and attempted to execute
it in a UNIX environment and got the error below..I created the application
in JBuilder 8 personal..do I need to add a specific library to run this GUI?
Exception in thread "main" 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:1
34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:62)
at java.awt.Window.init(Window.java:231)
at java.awt.Window.<init>(Window.java:275)
at java.awt.Frame.<init>(Frame.java:401)
at java.awt.Frame.<init>(Frame.java:366)
at javax.swing.JFrame.<init>(JFrame.java:154)
at apl.Frame1.<init>(Frame1.java:165)
at apl.EngineeringDump.main(EngineeringDump.java:86)
apl.EngineeringDump
83 //Main method
84 public static void main(String[] args) {
85 // Data data1 = new Data();
86 Frame1 frame = new Frame1();
87
88 try {
89
90 //; FillFrame(frame);
91
92 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
93 }
94 catch(Exception e) {
95 e.printStackTrace();
96 }
97
98
99 EngineeringDump egd = new EngineeringDump();
100
101 // frame.dm = new DataManager();
102 // frame.FlowDataToGUI(data1);
103 // frame.FlowDataToGUI(data1);
104 }
apl.Frame file:
165 public Frame1() {
166
167 enableEvents(AWTEvent.WINDOW_EVENT_MASK);
168 try {
169 jbInit();
170 }
171 catch(Exception e) {
172 e.printStackTrace();
173 }
174 }
Thanks, any assistance is greately appreciated!
Delali
|
|
0
|
|
|
|
Reply
|
Delali
|
11/12/2003 4:02:39 PM |
|
"Delali Dzirasa" <Delali.Dzirasa@jhuapl.edu> wrote in message
news:botliv$bpl$1@houston.jhuapl.edu...
> I am just about finished with my first java application, and am in the
> process of testing the deployment on a windows box as well as a UNIX box.
I
> have research / have created an executable jar file and attempted to
execute
> it in a UNIX environment and got the error below..I created the
application
> in JBuilder 8 personal..do I need to add a specific library to run this
GUI?
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window
> server using ':0.0' as the value of the DISPLAY variable.
Try setting your DISPLAY environment variable to your IP address followed by
:0
That's how the X server figures out where to send the graphics for display.
--
Wendy in Chandler, AZ
|
|
0
|
|
|
|
Reply
|
Wendy
|
11/12/2003 4:39:17 PM
|
|
Delali Dzirasa wrote:
> I am just about finished with my first java application, and am in the
> process of testing the deployment on a windows box as well as a UNIX box. I
> have research / have created an executable jar file and attempted to execute
> it in a UNIX environment and got the error below..I created the application
> in JBuilder 8 personal..do I need to add a specific library to run this GUI?
>
>
>
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window
>
> server using ':0.0' as the value of the DISPLAY variable.
It's telling you that it can't connect to the X server. There are a
couple of likely causes:
- you don't have X running (use command xinit or startx from the
command line)
- the X server is running under a different user id; solution here
is to allow connections using xhost +
|
|
0
|
|
|
|
Reply
|
bitbucket44 (1434)
|
11/12/2003 4:42:20 PM
|
|
you might also need to set the DISPLAY environment variable
"Sudsy" <bitbucket44@hotmail.com> wrote in message
news:3FB262EC.1030503@hotmail.com...
> Delali Dzirasa wrote:
>
> > I am just about finished with my first java application, and am in the
> > process of testing the deployment on a windows box as well as a UNIX
box. I
> > have research / have created an executable jar file and attempted to
execute
> > it in a UNIX environment and got the error below..I created the
application
> > in JBuilder 8 personal..do I need to add a specific library to run this
GUI?
> >
> >
> >
> > Exception in thread "main" java.lang.InternalError: Can't connect to X11
> > window
> >
> > server using ':0.0' as the value of the DISPLAY variable.
>
> It's telling you that it can't connect to the X server. There are a
> couple of likely causes:
> - you don't have X running (use command xinit or startx from the
> command line)
> - the X server is running under a different user id; solution here
> is to allow connections using xhost +
>
|
|
0
|
|
|
|
Reply
|
nos329 (257)
|
11/12/2003 5:29:56 PM
|
|
Delali Dzirasa wrote:
> I am just about finished with my first java application, and am in the
> process of testing the deployment on a windows box as well as a UNIX box. I
> have research / have created an executable jar file and attempted to execute
> it in a UNIX environment and got the error below..I created the application
> in JBuilder 8 personal..do I need to add a specific library to run this GUI?
>
>
>
> Exception in thread "main" java.lang.InternalError: Can't connect to X11
> window
>
> server using ':0.0' as the value of the DISPLAY variable.
No, you just have to verify that your DISPLAY environment variable is
set correctly, and that you're indeed running an X11 server on the
system. If you're running the application as a different user or on a
different host, you may need to use the xhost command to ensure that
host/user has permission to write to your display.
If you have to, check with your system administrator. This isn't a
Java issue -- it's an issue with X server accessibility. HTH!
Brad BARCLAY
--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org
|
|
0
|
|
|
|
Reply
|
Brad
|
11/12/2003 5:30:04 PM
|
|
nos wrote:
> you might also need to set the DISPLAY environment variable
>
I find it mush easier to ssh to the server and enable X tunneling. That
sets up all the display stuff for you. Like this:
ssh -X root@1.2.3.4
Mind you, you still need an X server running on your PC, which is a bit
tricky under windoze.
Steve.
|
|
0
|
|
|
|
Reply
|
shoot3 (240)
|
11/12/2003 10:12:05 PM
|
|
Sudsy wrote:
> Delali Dzirasa wrote:
>
>> I am just about finished with my first java application, and am in the
>> process of testing the deployment on a windows box as well as a UNIX
>> box. I
>> have research / have created an executable jar file and attempted to
>> execute
>> it in a UNIX environment and got the error below..I created the
>> application
>> in JBuilder 8 personal..do I need to add a specific library to run
>> this GUI?
>>
>>
>>
>> Exception in thread "main" java.lang.InternalError: Can't connect to X11
>> window
>>
>> server using ':0.0' as the value of the DISPLAY variable.
>
>
> It's telling you that it can't connect to the X server. There are a
> couple of likely causes:
> - you don't have X running (use command xinit or startx from the
> command line)
> - the X server is running under a different user id; solution here
> is to allow connections using xhost +
>
xhost + is a dangerous solution as it completely disables the limited
security which X provides (unless you are on a single-user system not
connected to any type of network when network security is irrelevent).
It's ok for a quick-and-dirty test to see if it cures the problem, but
security should be enabled again immediately after the test.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
|
|
0
|
|
|
|
Reply
|
nmw (686)
|
11/13/2003 12:59:37 PM
|
|
|
6 Replies
220 Views
(page loaded in 0.125 seconds)
|
|
|
|
|
|
|
|
|