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 ClassCastException: com.eteks.awt.PJAToolkit

stejr

Location : UK
Member since : Nov 20, 2003
Messages : 1
 Nov 20, 2003 at 10:15 AM
Attempting to launch an application installer on Solaris 9 - intel but am receiving the following error / feedback:
JDK 1.3.1

Font specified in font.properties not found [-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-regular-r---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-bold-i---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-bold-r---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-times new roman-regular-i---*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-regular-r-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-bold-r---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-arial-bold-i-normal--*-%d-*-*-p-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-i---*-%d-*-*-m-*-iso8859-1]
Font specified in font.properties not found [-monotype-courier new-regular-r---*-%d-*-*-m-*-iso8859-1]
java.lang.ClassCastException: com.eteks.awt.PJAToolkit
at sun.awt.GlobalCursorManager.getInstance(GlobalCursorManager.java:115)
at sun.awt.GlobalCursorManager.updateCursorImmediately(GlobalCursorManager.java:86)
at java.awt.Component.show(Component.java:918)
at java.awt.Window.show(Window.java:393)
at merlin.wizard.panels.SplashScreenInitializer.showSplashScreen(SplashScreenInitializer.java:152)
at merlin.wizard.panels.SplashScreenInitializer.run(SplashScreenInitializer.java:78)
at java.lang.Thread.run(Thread.java:479)

The java command arguments for the installer I'm using:

-Xbootclasspath/a:/opt/pja/pja_2.5/lib/pja.jar
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava2d.font.useFlatformFont=false -Djava.awt.fonts=/usr/java/jre/lib/fonts
-Duser.home=/opt/pja/pja_2.5

I tried both pja 2.4 and 2.5 (Beta) and also jdk 1.4.1 headless but receive the same error.

Any suggestions?
---
Steve

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Nov 20, 2003 at 5:42 PM
As stated in PJA FAQ "Why the methods show () or setVisible () of the class java.awt.Component throws ClassCastException with JDK >= 1.3 ?" :

These methods use the class sun.awt.GlobalCursorManager which supposes that the AWT toolkit returned by the method getDefaultToolkit () of the class java.awt.Toolkit inherits from sun.awt.SunToolkit ! As com.eteks.awt.PJAToolkit inherits directly from java.awt.Toolkit, it throws a ClassCastException exception.
Using addNotify () on an instance of java.awt.Frame instead of these methods is enough to enable the creation of off-screen images with the createImage () method of java.awt.Frame class, and avoids to wonder where will appear such a frame once the method show () is executed.
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation