On Windows 2000, the JFreechart works fine. When I try to access the fonts under Red Hat Linux, 6.2, I get the following error:
java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
Even just trying to list the fonts as follows:
GraphicsEnvironment env =
GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] fontNames = env.getAvailableFontFamilyNames();
out.println("Available Fonts:");
for(int i=0; i<fontNames.length; i++)
out.println(" " + fontNames);
Am I missing something in my classpath or path that the AWT needs?
thanks,
--heather grace
java.lang.NoClassDefFoundError-GraphicsEnvironment.java
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
Hi,
It looks like you don't have an X server running. If you have x running, the user JFreeChart is running under might not have permission to connect. try 'man xhost' to see how to set the permissions properly
It looks like you don't have an X server running. If you have x running, the user JFreeChart is running under might not have permission to connect. try 'man xhost' to see how to set the permissions properly
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
Hi,
I have the same problem under Solaris. Our system admin told me that
the X server has been disabled in order of security things.
Is there another way to let jFreeChart do his job ?
I have to call a servlet running on that server which should build the dataset, draw the chart on "graphics2D" and save this to a jpeg. All this
works fine while working on a form which runs on my WIn 2000 machine.
But on the Solaris machine...as said: NoClassDefFoundError
Thank you for every help.
I have the same problem under Solaris. Our system admin told me that
the X server has been disabled in order of security things.
Is there another way to let jFreeChart do his job ?
I have to call a servlet running on that server which should build the dataset, draw the chart on "graphics2D" and save this to a jpeg. All this
works fine while working on a form which runs on my WIn 2000 machine.
But on the Solaris machine...as said: NoClassDefFoundError
Thank you for every help.
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
There are a couple of solutions that I've heard about but never tried:
(1) Pure Java AWT (PJA). Several people have said that JFreeChart works with PJA. If you search for "X11" in this forum, there are some old threads about it.
(2) JDK1.4. I recall reading that JDK1.4 was going to eliminate the dependency on X11, can anyone confirm?
Regards,
Dave Gilbert.
(1) Pure Java AWT (PJA). Several people have said that JFreeChart works with PJA. If you search for "X11" in this forum, there are some old threads about it.
(2) JDK1.4. I recall reading that JDK1.4 was going to eliminate the dependency on X11, can anyone confirm?
Regards,
Dave Gilbert.
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
Hi,
(1) A searching does not find threads on this problem
(2) I'm working under SilverStream 3.7 and it works with jdk1.3, so I'm not
sure about installing jdk1.4
If anyone has an example for (1) or some other help....
Thanks to everyone here!
(1) A searching does not find threads on this problem
(2) I'm working under SilverStream 3.7 and it works with jdk1.3, so I'm not
sure about installing jdk1.4
If anyone has an example for (1) or some other help....
Thanks to everyone here!
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
The search does work, but you need to specify all dates. Here's a link to one thread to get you started:
http://dgilbert.boson.posiweb.net/phoru ... =570&t=542
Regards,
DG.
http://dgilbert.boson.posiweb.net/phoru ... =570&t=542
Regards,
DG.
Re: java.lang.NoClassDefFoundError-GraphicsEnvironment.java
Jdk1.4.0 can run 'headless' by starting the jvm with -Djava.awt.headless=true. Then you 've to create a jpeg or png from the chart to file or as servlet. Tried it on w2k but not on linux without X so can't confirm if it works.
PJA should also work, can't remember but at a french site there was a pure java impl. that should run without a native graphical env.
Michiel
PJA should also work, can't remember but at a french site there was a pure java impl. that should run without a native graphical env.
Michiel