Hi. Just to let everyone know how I got round the problem of not having an
XServer.

Go to http://www.eteks.com/pja/ and download the install file for your
appropriate machine mac/pc/UNIX (the download has english instructions -
the site is in french).

unpack file etc on machine

in any code you use, have the following lines :

System.setProperty ("awt.toolkit", "com.eteks.awt.PJAToolkit");
System.setProperty ("java.awt.graphicsenv","com.eteks.java2d.PJAGraphicsEnvironment");
System.setProperty ("java.awt.fonts","/usr/java/jdk1.3/jre/lib/fonts");
System.setProperty ("java2d.font.usePlatformFont","false");
System.setProperty ("user.home","/home/dev/java/servlets/decisions/pja_2.1");

where the last line is the directory you unpacked your pja files to.

put this line in your jserv.properties file :

wrapper.bin.parameters=-Xbootclasspath/a:/home/dev/java/servlets/decisions/pja_2.1/lib/pja.jar

your servlets will now run using Java2D as is but doesn't need an XServer.

if you want to run java progs from command line, just type :

java -Xbootclasspath/a:<path to pja.jar here> my_class_file

[I had pja.jar in my classpath too for compiling the files in the first
place]

thanks to all who posted comments

Regards

S.


On Tue, 12 Sep 2000, Scott McDaid wrote:

> Hi, I'm having real problems with using Java2D on a UNIX system without an
> XServer. As far as I can see there's no way to use Java 2D without an X
> Server being present on the system.
>
> I've tried to use a 100 pct pure Java
> implementation of the AWT toolkit (http://www.eteks.com/pja/doc/) which
> works for my programs (applications) ran using following syntax
>
> 'java -Xbootclasspath/a:<path to jpa.jar> my_class_file'
>
> but I don't know how to use the API using servlets. I want to write a
> class which my servlet can call to graph data. It says in the
> documentation that I should be able to add this -Xbootclasspath into my
> servlet command line ?!
>
> does anyone know how to do this. I'm running Apache Jserv.
>
> Thanks for any help! I think my only other option is native methods and
> C/GD for graphing !
>
> Regards
>
> Scott.
>
> --
> Scott McDaid
> edNET
> t: +44 131 625 5557 (direct dial)
> t: +44 131 466 7003 (office)
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

--
Scott McDaid
edNET
t: +44 131 625 5557 (direct dial)
t: +44 131 466 7003 (office)

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to