X11 and Pure Java AWT

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Joel

X11 and Pure Java AWT

Post by Joel » Thu Jun 21, 2001 10:06 pm

Hello everyone,
I'm trying to develop a servlet to produce graphs, and I can get it to work on my machine just fine. When I move the .class files over to our server, it crashes with the X11 error. I downloaded the PJA toolkit, and implemented it the way eteks said to, but I'm still coming up with the same error. Has anyone gotten this toolkit to work with JFreeChart yet?

Thanks in advance,
Joel

Dino

RE: X11 and Pure Java AWT

Post by Dino » Fri Jun 29, 2001 3:23 am

The following link:

http://www.jrefinery.com/forums/read.ph ... =534&t=506

has some info on this.


dino

Joel

RE: X11 and Pure Java AWT

Post by Joel » Fri Jun 29, 2001 7:20 pm

Thanks,
I actually got it to work just the other day. I got a different error (I can't remember how I fixed the first), where java couldn't find the eteks package at runtime. It would compile fine, but when java went to get the graphics environment, it couldn't find it anymore. So, in the end, and through much frustration, I unpacked rt.jar, stuck the eteks package in there, repacked it, and it works fine now 8^) Does anyone happen to know a better way of doing it than this, because this does work, it's just not a great solution.

Joel

Joel

RE: X11 and Pure Java AWT

Post by Joel » Fri Jun 29, 2001 7:22 pm

Thanks,
I actually got it to work just the other day. I got a different error (I can't remember how I fixed the first), where java couldn't find the eteks package at runtime. It would compile fine, but when java went to get the graphics environment, it couldn't find it anymore. So, in the end, and through much frustration, I unpacked rt.jar, stuck the eteks package in there, repacked it, and it works fine now 8^) Does anyone happen to know a better way of doing it than this, because this does work, it's just not a great solution.

Joel

Dino

RE: X11 and Pure Java AWT

Post by Dino » Fri Jun 29, 2001 9:03 pm

It all depends. What server are you using?

Typically, you need to add the eteck.jar file to the classpath which probably means you need to modify a configuration file on the server.

dino

Joel

RE: X11 and Pure Java AWT

Post by Joel » Thu Jul 05, 2001 9:32 pm

Dino,
I haven't actually found out what server will be used when this goes into production (I'm finding out tomorrow morning.) As for testing, I'm using JBuilder's server on my own machine, and JSDK 2.1 web server for testing on a Unix machine.

As for the eteck.jar(actually pja.jar), I've got that sitting in my classpath, and it shows up as being in my classpath when the JSDK server starts. I looked in pja.jar, and the class that java says it can't find is in there. I also, just to test it, did an import of that class in my servlet, and it had no problems at compile time, so my compiler found it ok.

Which config file should I modify on the server? Also, what should I put in the config file. Sorry, I haven't done much webserver configuration before.

Thanks,
Joel

Ralph Brandes

RE: X11 and Pure Java AWT

Post by Ralph Brandes » Mon Jul 09, 2001 1:45 pm

... Has anyone gotten this toolkit to work with JFreeChart yet?
yes,
see message "sun.java2d.SunGraphicsEnvironment"

Locked