Link to home
Start Free TrialLog in
Avatar of glory_k
glory_k

asked on

Can't connect to X11 Windows when run swing

Hi,

When I try to run the swing application on the shell by typing java test the application will run and the windowdid display  but when I run on the rc3.d when reboot it display error can't connect to X11 Windows.

I have set and export DISPLAY and able to see the xclock. I'm using jdk1.4.0_03. I login as a root. I'm running on Solaris 5.

How to fix this error?


Thanks
Avatar of Nukfror
Nukfror
Flag of United States of America image

Its not an error - the problem is there isn't an Xserver at boot time.  Since your applicaton wants to talk to an Xserver you really need to ask yourself if its really appropriate to try to start it up in the rc3.d scripts in the first place - IMHO the answer is no.  Boottime applications shouldn't be expecting to talk to an Xserver.

But you could probably make it work at boottime if you played around with Xvfb or maybe with VNC - but you should reconsider trying to start it at boottime.
Avatar of ramazanyich
For JDK1.4 there is a simple solution: pit -Djava.awt.headeless=true on your command line which starts java application
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial