Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Can't find .pjaf font

test

Member since : Jun 2, 2003
Messages : 1
 Jun 2, 2003 at 5:08 AM
Like this question.In my servlet
I've added the line 'wrapper.bin.parameter = -Xbootclasspath/a:/usr/pja_2.4/lib/pja.jar' and the other line to the jserv.properties.
but I found it`s useless.It could create the image,but it`s error"java.awt.AWTError: No default font : at least one .pjaf font must be loaded.In case of an error related to font",and i have .pjaf file.but i don`t
know where i could put it. And in "FAQ", command "java command line "refer what? in my servlet ,how i put the command.
Thanks!

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Jun 5, 2003 at 9:14 AM
You shouldn't need any .pjaf font file with a JDK version >= 1.2, excepted if you use directly a PJA class (like new PJAImage (100, 100) ) or if you set the com.eteks.awt.nojava2d System property to true.
Before going further, you should try PJAToolkitDemo1.2.sh demo. Does it work on your machine ?
If it doesn't, you should also check if you have installed the basic X11 libraries on you machine. The X11 libs (not a full X11 server) are required by the awt.so java library. If the X11 libs are not installed you won't be able to run a simple instruction like new Color (0,0,0) !
---
Manu (moderator/modérateur)

Eddy

Location : France
Member since : Jun 13, 2007
Messages : 3
 Jun 13, 2007 at 5:40 PM
Hi !
I've got the same problem on Linux Red Hat, JDK 1.3.1, Websphere 5.02

I'm generating Charts with JFreeChart 1.05 and PJA 2.5

I've tested the ToolkitDemo
It works with the text Image only when I set com.eteks.awt.nojava2d to true and put the PJAF files in the directory where I execute the .sh script (only 3 images on 4 are generated, the 4th with text incrustation doesn't work)

For the configuration of my server, I've got this :
- awt.toolkit : com.eteks.awt.PJAToolkit
- com.eteks.awt.nojava2d : true
- java.awt.fonts : /usr/WebSphere/AppServer/java/jre/lib/fonts
- java.awt.graphicsenv : com.eteks.java2d.PJAGraphicsEnvironment
- java2d.font.usePlatformFont : false
- user.home : /usr/pja

in /usr/pja/lib, I've put the pja.jar, pjatools.jar and font.properties from the PJA zip

I've put the pjaf files everywhere I can :
in my java.awt.fonts path
in my user.home path

but when I generate a chart, I don't have any text in them
the font used is SansSerif

Can somebody help me please ?

Thanks by advance.

Eddy

Location : France
Member since : Jun 13, 2007
Messages : 3
 Jun 14, 2007 at 7:01 AM
it seems that the demo works when I place the pjaf fonts in the java.awt.fonts path but not my web application on WebSphere =\
I don't instantiate new PJAGraphicsEnvironment anywhere in my code
is it because maybe JFreccChart instantiate a new graphic environment somewhere and it is as if it instantiate an new PJAGraphicsEnvironment ?

Eddy

Location : France
Member since : Jun 13, 2007
Messages : 3
 Jun 14, 2007 at 10:40 AM
It works !
I've used the platform fonts
modifying the rt.jar into rtgraphics.jar as told in the FAQ
in order not to crash the JVM
Thanks eTeks team !

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Jun 14, 2007 at 7:24 PM
I'm pleased you made it work by yourself ! :-)
Thank you for your feedback
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation