PJA at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

P

pcouas

Hi,

I want use PJA 2.4 on AIX 4.3.3.11 with IBM JDK 1.3.1

My launch command is
/usr/java131/bin/java -Xbootclasspath/a:./rdfax11/pja.jar \
-Dawt.toolkit=com.eteks.awt.PJAToolkit \
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \
-Djava2d.font.usePlatformFont=false \
-Djava.awt.fonts=/usr/java131/jre/lib/fonts \
-Duser.home=. \
-classpath ./rdfax11/pjatools.jar:./rdfax11/rfax.jar:. \
rdfax11.FaxTest3


Could you explain me this error message
I think this is problem with DISPLAY because there is no X server on my AIX.
It seems me PJA don't need X server ???


Exception in thread "main" java.lang.InternalError: .
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:7
7)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:
126)
at com.eteks.java2d.PJAGraphicsEnvironment.<init>(PJAGraphicsEnvironment
..java:66)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:262)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:72)
at java.awt.Font.initializeFont(Font.java:285)
at java.awt.Font.<init>(Font.java:319)
at com.java4less.rfax.TextFaxProducer.<init>(TextFaxProducer.java:29)
at rdfax11.FaxTest3.main(FaxTest3.java:43)

Where is my mistake ??
Best regards

Philippe
 
R

Rob

Hi,

PJA does require certain X Libs to be installed on the machine, at a bare
minimum (NOT a running X-server -- just the libraries). It is true that
they won't be used, but certain AWT classes do want to load them as static
initializers (java.awt.Font is one of those classes). So, PJA may not work
for you if you do not have the libraries present on the machine at all.
Here's an explanation from one of the moderators at PJA:

"Basic X11 libs like libX11.so or libXt.so are required to run some java.awt
classes like java.awt.Color or java.awt.Font. Running a line as simple as
Color c = Color.white; in your program will require X11 libs (but not a
running X11 server), and PJA can't change anything to that because of the
static initializer of java.awt.Color class. You'll have to set the
java.awt.fonts, awt.toolkit, java.awt.graphicsenv properties too if you want
to use PJA.
If ever you really don't want to install X11, you won't be able to run the
following classes : java.awt.Toolkit
java.awt.Color
java.awt.Rectangle
java.awt.Font
java.awt.FontMetrics
java.awt.image.ColorModel
By chance, you'll still be able to run java.awt.Image or java.awt.Graphics
and their subclasses com.eteks.awt.PJAImage, com.eteks.awt.PJAGraphics. That
allows you to create buffered images using only PJA classes ; please see
PJADemo.java for an example..."

Look at the following link for more information:
http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=38

Hope it helps,
Rob

Hi,

I want use PJA 2.4 on AIX 4.3.3.11 with IBM JDK 1.3.1

My launch command is
/usr/java131/bin/java -Xbootclasspath/a:./rdfax11/pja.jar \
-Dawt.toolkit=com.eteks.awt.PJAToolkit \
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \
-Djava2d.font.usePlatformFont=false \
-Djava.awt.fonts=/usr/java131/jre/lib/fonts \
-Duser.home=. \
-classpath ./rdfax11/pjatools.jar:./rdfax11/rfax.jar:. \
rdfax11.FaxTest3


Could you explain me this error message
I think this is problem with DISPLAY because there is no X server on my AIX.
It seems me PJA don't need X server ???


Exception in thread "main" java.lang.InternalError: .
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at
sun.awt.X11GraphicsEnvironment. said:
7)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:142)
at
sun.java2d.SunGraphicsEnvironment. said:
 
P

pcouas

Hi,

I have X11 lib installed like X11.bos.rte and post my question on
eteks faq but without answer.
My Java instruction is textFont=new Font("Serif",Font.PLAIN,12);

Help me !

Regards
Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top