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 PJA on AIX 5.2

craigrpeters

Location : St. Louis, MO USA
Member since : Jan 31, 2005
Messages : 1
 Jan 31, 2005 at 10:55 PM
I wanted to confirm there is a significant issue running PJA on AIX with regards to using JDK fonts. I know this is discussed in other threads, but there doesn't seem to be any definitive answers. Here's our platform stack:

- AIX 5.2
- IBM JDK 1.3.1, 64 bit with all the latest patches applied
[-version shows the following: Classic VM (build 1.3.1, J2RE 1.3.1 IBM AIX 5L for PowerPC (64 bit JVM) build caix64131-20041210 (JIT enabPJAToolkitTextDrawer.gifled: jitc))]
- PJA 2.4 (or 2.5, didn't seem to matter)

With this stack, following is the only combination of configuration parameters that would produce a version of PJAToolkitTextDrawer.gif with fonts displayed in it from the test script PJAToolkitDemo1.2.sh:

$JDK_HOME/bin/java -Xbootclasspath/a:$PJA_HOME/lib/pja.jar \
-Dos.name=fake \
-Dawt.toolkit=com.eteks.awt.PJAToolkit \
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment \
-Djava2d.font.usePlatformFont=true \
-Djava.awt.fonts=/winfonts \
-Duser.home=$PJA_HOME \
-classpath $PJA_HOME/lib/pjatools.jar \
ToolkitDemo

2 big issues we have with this:

1) The JDK fonts cannot be used. This has been discussed elsewhere on this forum, but no reason has ever been provided. The font directory parm contains a copy of Arial fonts from Windows, and those seem to be the only fonts that will work. Period. Why?

Further, I have installed the IBM JDK for Windows on my PC, and the Lucinda fonts work fine. I've even tried copying those fonts up to AIX, but they still don't work.

This seems to point to a very serious issue with AIX IBM JDK font handling.

2) The parm -Dos.name=fake is very worrisome. That is a JDK standard property. So far we haven't seen any problems, but who knows what JARs/libs use this????? Tomcat, JDBC, Xerces/XML, ... -- we use all kinds of things in our apps.

Anyone know why this fixes the problem? Is PJA testing for the OS and doing things different based on that value??

Anyone know of any way to get around setting this?

Anyone know of any specific things to watch out for setting the -Dos.name parameter in other areas outside of PJA/fonts?

Thanks!,
-Craig
---
craigrpeters

stefan_b

Member since : Dec 1, 2005
Messages : 1
 Dec 1, 2005 at 11:21 AM
Hello,

Any news on this subject ?. We have a similar problem with build ca131-20041210.

<<<<
WAS 5.0.2, AIX 5.2,
Java version = J2RE 1.3.1 IBM AIX build ca131-20041210 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
>>>>

The PJA have been worked fine with build ca131-20030618. After patching WAS we got the "java.lang.InternalError: Can't connect to X11 window server using ':0.0' ... ".


Any workarounds ? :-)

jamessick

Member since : Oct 31, 2007
Messages : 1
 Oct 31, 2007 at 1:40 PM
We ran into this same thing recently and we have a workaround that worked for us.

First we had to set the headless property, which wasn't necessary on Solaris. But that still didn't fix it on builds later than ca131-20030618.

The fonts that were failing were assigned to static variables (in the constants in JFreeChart, in our case). If we just create some fonts non-statically before reaching the static ones, it seems to work. So we added this to the init() method:

System.setProperty("java.awt.headless", "true");
try {
java.awt.Font arial10 = new java.awt.Font("Arial", java.awt.Font.PLAIN, 10);
java.awt.Font arial12 = new java.awt.Font("Arial", java.awt.Font.PLAIN, 12);
java.awt.Font arial18 = new java.awt.Font("Arial", java.awt.Font.PLAIN, 18);
} catch (Exception e){
e.printStackTrace();
}

and now it works. I can't tell you why, but it worked for us.


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation