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 pja2.4 with jdk1.2 and iplanet 4.1

willcj

Location : San Francisco/USA
Member since : Nov 3, 2003
Messages : 2
 Nov 3, 2003 at 6:51 PM
Hi,
I am trying to use the pja classes with jdk1.2 in some servlet code that runs on iplanet 4.1. I can create a client and run it from command line and it works fine:

java -Djava.awt.headless=true
-Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment
-Djava2d.font.usePlatformFont=false
-Djava.awt.fonts=/opt/java1.4/jre/lib/fonts
-Xbootclasspath/a:/usr/netscape/server4/docs/lib/pja_2.4/lib/pja.jar
-classpath /usr/netscape/server4/docs/lib/pja_2.4/lib/pja.jar:/usr/netscape/server4/docs/lib/pja_2.4/lib/pjatools.jar
:.:/usr/netscape/server4/docs/lib/pja_2.4/lib/servlet.jar:/usr/netscape/server4/docs/lib/pja_2.4/lib

But when I add the same options to the jvm12.conf file and/or add
//System.setProperty("java.awt.headless", "true");
System.setProperty ("java.awt.graphicsenv", "com.eteks.java2d.PJAGraphicsEnvironment");
System.setProperty ("awt.toolkit", "com.eteks.awt.PJAToolkit");
//System.setProperty("java2d.font.usePlatformFont", "false");
System.setProperty("java.awt.fonts", "/opt/java1.2/jre/lib/fonts" );

to my servlet code, then I get the following error:
java.awt.AWTError: Toolkit not found: com.eteks.awt.PJAToolkit
at java.awt.Toolkit$2.run(Toolkit.java:501)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492)
at javax.swing.ImageIcon.(ImageIcon.java:64)
at javax.swing.ImageIcon.(ImageIcon.java:83)
at PhotoUpload.createThumbnail(PhotoUpload.java:376)
at PhotoUpload.service(PhotoUpload.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:504)

Please advise.

Thank you!

---
cw

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Nov 11, 2003 at 8:31 AM
pja.jar must be added to bootclasspath using the option -Xbootclasspath/a:path/to/pja.jar
According to the subject http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=47 it looks like you may specify this kind of option in the JAVA_ARGS environment variable.

By the way, if you experience a JVM crash with JDK 1.2 and PJA, please read the FAQ "Why the Java Virtual Machine crashes when I use fonts on UNIX platform ?" to get a solution.
---
Manu (moderator/modérateur)

willcj

Location : San Francisco/USA
Member since : Nov 3, 2003
Messages : 2
 Nov 11, 2003 at 5:00 PM
My apologies for not being explicit about this from the beginning. Yes, my jvm options are configured as following:

-Xbootclasspath/a:/usr/netscape/server4/docs/lib/pja_2.4/lib/pja.jar,-Dawt.toolkit=com.eteks.awt.PJAToolkit,
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment,-Djava.awt.fonts=/opt/java1.2/jre/lib/fonts,
-Duser.home=/usr/netscape/server4/docs/lib/pja_2.4

And I get the error:
java.awt.AWTError: Toolkit not found: com.eteks.awt.PJAToolkit
at java.awt.Toolkit$2.run(Toolkit.java:501)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:492)
at javax.swing.ImageIcon.(ImageIcon.java:64)
at javax.swing.ImageIcon.(ImageIcon.java:83)
at PhotoUpload.createThumbnail(PhotoUpload.java:375)
at PhotoUpload.service(PhotoUpload.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:504)

I am hoping that the version of java and iplanet 4.1 (as opposed to iplanet 6.X, in the message you referenced) are not what is causing the problem.

Thank you very much for your help!
---
cw

balcony

Member since : Nov 15, 2003
Messages : 1
 Nov 15, 2003 at 8:28 AM
I have the same problem with jdk1.3 and iplanet4.1 in Solaris 8. I guess
the reason is iplanent4.1 can't pass the jvm.option in jvm12.conf to java.
That means jvm.option in jvm12.conf isn't work.
That's many message in forum which say this problem
"can not find class com.eteks.java2d.PJAGraphicsEnvironment"
and also set -Xbootclasspath/a:/path/to/pja.jar.
I guess -Xbootclasspath option don't work under some java app server,or
java app server can't pass this option to java.

Thanks for anyone's help.




Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation