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 ClassCast Exception despite correct setting

Ucero

Location : Brussels
Member since : Jan 12, 2004
Messages : 1
 Jan 12, 2004 at 4:11 PM
I am running a stand-alone java application on a HP-unix box. The version of java I am using is:
java version "1.3.1.06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.06-020625-14:20)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.06-JPSE_1.3.1.06_20020625 PA1.1, mixed mode)

When I am using any command like graphics2D.draw() or fill() I am getting the following exception:
Exception in thread "main" java.lang.ExceptionInInitializerError: java.lang.ClassCastException: com.eteks.java2d.PJAGraphicsConfiguration
at sun.awt.motif.MToolkit.<clinit>(MToolkit.java:63)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.Toolkit$2.run(Toolkit.java:507)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:498)

My startup line is: java -classpath $PATH -Xbootclasspath/a:/home/baeyensp/lib/pja.jar -Dawt.Toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv="com.eteks.ja
va2d.PJAGraphicsEnvironment" -Djava.awt.fonts=$JDK_MYHOME/jre/lib/fonts be.fedict.cafe.arch.elections.imaging.TestAWTRenderer

Any ideas why this might be failing?

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Jan 12, 2004 at 4:31 PM
> My startup line is:
java -classpath $PATH -Xbootclasspath/a:/home/baeyensp/lib/pja.jar -Dawt.Toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv="com.eteks.java2d.PJAGraphicsEnvironment" -Djava.awt.fonts=$JDK_MYHOME/jre/lib/fonts be.fedict.cafe.arch.elections.imaging.TestAWTRenderer

It's simply a case error in -Dawt.Toolkit=com.eteks.awt.PJAToolkit option :
You shouldn't use the upper case letter T in awt.Toolkit property but the lower case letter t (=> -Dawt.toolkit=com.eteks.awt.PJAToolkit)
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation