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 Does PJA support JDK 1.4.1 ?

PJABarney

Location : K-Town / Germany
Member since : May 19, 2003
Messages : 2
 May 19, 2003 at 4:02 PM
Hi there,

all worked fine in my Java 1.3.1 environment. Now trying JDK 1.4.1_01 on
i86 SuSE Linux I got the following Exceptions:

java.lang.AbstractMethodError: sun.java2d.SunGraphicsEnvironment.createFontProperties()Lsun/awt/FontProperties;
at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:95)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:78)
at com.eteks.java2d.PJAGraphicsEnvironment.<init>(PJAGraphicsEnvironment.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at javax.swing.text.html.CSS.getValidFontNameMapping(CSS.java:906)
at javax.swing.text.html.CSS$FontFamily.parseCssValue(CSS.java:1858)
at javax.swing.text.html.CSS.getInternalCSSValue(CSS.java:529)
at javax.swing.text.html.CSS.addInternalCSSValue(CSS.java:514)
...


java.lang.NoSuchMethodError: sun.awt.font.NativeFontWrapper.registerFonts(Ljava/util/Vector;ILjava/util/Vector;I)V
at sun.java2d.SunGraphicsEnvironment.addPathFonts(SunGraphicsEnvironment.java:527)
at sun.java2d.SunGraphicsEnvironment.registerFonts(SunGraphicsEnvironment.java:435)
at sun.java2d.SunGraphicsEnvironment.access$200(SunGraphicsEnvironment.java:52)
at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:132)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:111)
at sun.java2d.SunGraphicsEnvironment.initTerminalNames(SunGraphicsEnvironment.java:831)
at sun.java2d.SunGraphicsEnvironment.initCompositeFonts(SunGraphicsEnvironment.java:702)
at sun.java2d.SunGraphicsEnvironment$1.run(SunGraphicsEnvironment.java:90)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:70)
at com.eteks.java2d.PJAGraphicsEnvironment.<init>(PJAGraphicsEnvironment.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
at javax.swing.text.html.CSS.getValidFontNameMapping(CSS.java:906)
...

Any ideas ?

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 May 19, 2003 at 9:46 PM
PJA supports JDK 1.4.0 but doesn't support JDK 1.4.1 at this time (unless you directly instantiate PJAImage class and don't use java.awt.Font class). As the exception suggests, the main reason is that Sun added the following method in sun.java2d.SunGraphicsEnvironment class :
protected abstract sun.awt.FontProperties createFontProperties();
and this method isn't implemented in com.eteks.java2d.PJAGraphicsEnvironment.
The sun.awt.FontProperties object this method is supposed to return is a JDK 1.4.1 new class that has plenty of remarks :
REMIND: remove this method and references to it from the next feature release
You can guess, this isn't really motivating with such remarks to modify com.eteks.java2d.PJAGraphicsEnvironment to allow it to support JDK 1.4.1 !

Do you really need support for JDK 1.4.1 or are you just trying it ?
By the way, did you try to set the java.awt.headless System property to true and see if the new headless system works for your classes without PJA ?
---
Manu (moderator/modérateur)

PJABarney

Location : K-Town / Germany
Member since : May 19, 2003
Messages : 2
 May 20, 2003 at 9:14 AM
Many thanks for your fast answer !

The option -Djava.awt.headless=true works fine for my purposes.

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Jun 30, 2003 at 10:28 AM
People interested to run PJA under JDK 1.4.1 or JDK 1.4.2 can try PJA 2.5 Beta version available at http://www.eteks.com/pja/en/#Download .
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation