tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jennings <m...@southgatesoftware.com>
Subject Re: X11 Windows System and Tomcat
Date Mon, 13 May 2002 02:57:40 GMT
Modify the startup script for tomcat so that the java.awt.headless system
property is set
to true.

Example:

java -Djava.awt.headless=true -cp $CLASSPATH $MAINCLASS

This will tell the Java virtual machine to use a non-X11 toolkit for images
etc.


----- Original Message -----
From: "Micael Padraig Og mac Grene" <caraunltd@harbornet.com>
To: <tomcat-dev@jakarta.apache.org>
Cc: "Teresa Rebo" <teresa@teresarebo.com>
Sent: Sunday, May 12, 2002 5:03 PM
Subject: X11 Windows System and Tomcat


> This is maybe not a pure Tomcat question, but I am running a servlet on
> Tomcat which uses javax.swing, to resize jpeg images, but which does not,
> of course, want to display those images.  This throws an exception, due to
> a bug in the JDK 1.4.
>
> The exception is:
>
>
> 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><>(11GraphicsEnvironment.java:126)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:130)
> at java.awt.Toolkit#2.run(Toolket.java:712)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:703)
> at javax.swing.ImageIcon.(init>(ImageIcon.java:81)
> at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
>
> ps aux reveals: "/etc/X11/X -auth /var/lib/kdm/authfiles/A:0-0Dqymv"
>
> Anyone know the command I need to use to solve this, if any?  I would
> prefer not to use a virtual X11 system, or to build a substitute Toolkit
> for the JDK.
>
> Thanks,
>
> Micael
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message