Home pageFind It!Contact PJAPJA documentation


 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 2.5 with WebSphere & JCaptcha


Member since : Jul 10, 2006
Messages : 1
 Jul 11, 2006 at 1:47 AM

We are also trying to get the PJA 2.5 on a Websphere, with RedHat Linux. We need it to get the JCaptcha working, for Security issues we don't have the Server X active.

We had followed all the instructions, the PJAToolkitDemo1.2.sh generated the images succesfully. We set on the administrative Console, on the JVM settings, the properties java.awt.headless, java.awt.fonts, awt.toolkit, java.awt.graphicsenv, java2d.font.usePlatformFont and user.home, when we ask on the jsp the following System.out, we get the same configuration of the PJAToolkitDemo1.2

System.out.println("fonts del sistema:\t"+ System.getProperty("java.awt.fonts") + "\nawt.headless:\t" + System.getProperty("java.awt.headless") + "\nawt.toolkit:\t" + System.getProperty("awt.toolkit") + "\njava.awt.graphicsenv\t" + System.getProperty("java.awt.graphicsenv") + "\nusePlatform\t" + System.getProperty("java2d.font.usePlatformFont", "false") + "\nuser.home\t" + System.getProperty("user.home"));

But when we try to generate a text with JCaptcha on this application, when we try

java.util.List defaultFonts = initializeFonts(GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts());

we get a nullPointerException. We asked on JCaptcha forums, but they suggested that it was a misconfiguration of the PJA, can someone help us?

Thanks in advanced

roymon tecutli


Member since : Aug 5, 2007
Messages : 1
 Aug 5, 2007 at 4:48 AM
try this code for test.

import java.awt.GraphicsEnvironment;

import junit.framework.TestCase;

public class Bug6358034Test extends TestCase {

public void test() throws Exception {
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
// NullPointerException does not have to be thrown
((sun.awt.Win32GraphicsEnvironment) ge).displayChanged();

public static void main(String[] args) {



Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation