Messages of subject
PJA error: class not found |
rahulkav
Member since : May 27, 2003
Messages : 3
|
May 27, 2003 at 10:41 AM
I tried to run PJA on WINDOWS NT and SOlaris 2.6 but it
> failed giving the following error:
> "java.lang.Error: Could not find class: com.eteks.java
> "
>
> I have set the Followig System properties as suggested:
>
> System.setProperty ("awt.toolkit", "com.eteks.awt.PJAToolkit");
> System.setProperty("java.awt.graphicsenv","com.eteks.java2d.PJAGraphicsEnviron
> ment");
> //
System.setProperty("java.awt.fonts","/usr/openwin/lib/X11/fonts/Type1:/us
> r/openwin/lib/X11/fonts/TrueType");
> System.setProperty("java.awt.fonts","C:\\WINNT\\Fonts");
>
> and the jar files pja.jar and pjatools.jar are in classpath. But still the
> error. Can you please help me out.
>
> Regards,
> Rahul
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
May 27, 2003 at 10:08 PM
Adding pja.jar to the java classpath is miserably not enough. pja.jar must be added to bootclasspath (thanks to the java option -Xbootclasspath/a:pja.jar). Please read the FAQ "What options do I have to add to java command line to use PJA with my servlet server on UNIX platform ?"
If you don't have access to the java command line on you server, you may change your servlet to use directly the com.eteks.awt.PJAImage class instead of java.awt.Image. Please see PJADemo.java for an exemple and write again if you need more help...
--- Manu (moderator/modérateur)
|
rahulkav
Member since : May 27, 2003
Messages : 3
|
May 28, 2003 at 5:38 PM
thanks for your reply Manu.
Actually I am not directly playing around with other AWT classes.
In my program I am just instantiateling Font which I think internally uses other java.awt classes and hence the graphics display of the system.
The application Server used is Jakarta - Tomcat 3.3.1
Do you have any idea how do I modify the xbootclasspath in the one of the .bat(for windows) or .sh (for Unix).
It seems that classes in the xbootclasspath are loaded only once i.e. when JVM instance is created. and hence just adding pja.jar in classpath doesn't help.
If you have some more info. please advice.
rgds,
Rahul
> Adding pja.jar to the java classpath is miserably not enough. pja.jar must be added to bootclasspath (thanks to the java option -Xbootclasspath/a:pja.jar). Please read the FAQ "What options do I have to add to java command line to use PJA with my servlet server on UNIX platform ?"
>
> If you don't have access to the java command line on you server, you may change your servlet to use directly the com.eteks.awt.PJAImage class instead of java.awt.Image. Please see PJADemo.java for an exemple and write again if you need more help...
>
|
Manu
Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
|
May 29, 2003 at 11:12 AM
> The application Server used is Jakarta - Tomcat 3.3.1
>
> Do you have any idea how do I modify the xbootclasspath
> in the one of the .bat(for windows) or .sh (for Unix).
Try to set the TOMCAT_OPTS environment variable to -Xbootclasspath/a:path/to/pja.jar
Caution : From Tomcat 4.x TOMCAT_OPTS has been renamed JAVA_OPTS --- Manu (moderator/modérateur)
|