[SunHELP] Java image and xhost +
surewin champion
unix2000 at email.com
Wed Feb 27 05:37:49 CST 2002
Hi,
I am running a JSP file in Unix machine, the web server is apache using port 80. Servlet Engine is using port 8009.
In my Jsp program, I want to read an image file:
Image image = Toolkit.getDefaultToolkit().getImage(url);
My problem is : I need to issue a "xhost +" command before I am able to display the image in my client PC's browser.
Please tell me why xhost + is necessary? How to by-pass the xhost + command.
If I don't type the xhost + command, I will get the following error:
java.lang.InternalError: Can't connect to X11 window server using '10.3.10.15:0.0' as the value of the DISPLAY
variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
at sun.awt.motif.MToolkit.(MToolkit.java:57)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.Toolkit$2.run(Toolkit.java:512)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:503)
Pls help.
Urgent. thanks
--
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Email.com
http://www.email.com/?sr=signup
More information about the SunHELP
mailing list