Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I use JConsole with PJA?

843798Oct 5 2009 — edited Oct 5 2009
Hi!

We're having some trouble with a combination of jconsole, SuSE 11 and Citrix terminal server. The jconsole windows fails to appear on the X-server, but can be seen as a running process. If we use the Cygwin X-server, it works, but we cannot use this for all users.

In trying to find a workaround, I'm trying to use another graphics toolkit, in the hope that moving some of the used graphic functionality from native code to Java would clean up the problem. I'm trying to use PJA version 2.5 from http://www.eteks.com/pja/en/.

I start jconsole with...

jconsole -J-Xbootclasspath:$JAVA_HOME/jre/lib/rt.jar:$PJA -J-Dawt.toolkit=com.eteks.awt.PJAToolkit -J-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -J-Djava.awt.fonts=$JAVA_HOME/jre/lib/fonts

... but gets a stacktrace:

Exception in thread "main" java.lang.AbstractMethodError: sun.java2d.SunGraphicsEnvironment.createFontConfiguration()Lsun/awt/FontConfiguration;
at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:224)
at java.security.AccessController.doPrivileged(Native Method)
at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:127)
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:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at javax.swing.RepaintManager.<clinit>(RepaintManager.java:179)
at javax.swing.UIManager.initialize(UIManager.java:1449)
at javax.swing.UIManager.maybeInitialize(UIManager.java:1421)
at javax.swing.UIManager.getLookAndFeel(UIManager.java:495)
at sun.tools.jconsole.JConsole.updateLafValues(JConsole.java:63)
at sun.tools.jconsole.JConsole.<clinit>(JConsole.java:58)


I'm stumped; I have no idea how to continue from here. Can anyone shed some light?

Some further info:
- $JAVA_HOME points to a JDK 1.6 installation.
- $PJA point to the pja.jar file from PJA 2.5
- The command "jconsole -version" hangs, but "jconsole -J-Xbootclasspath:$JAVA_HOME/jre/lib/rt.jar:$PJA -J-Dawt.toolkit=com.eteks.awt.PJAToolkit -version" does display version info.
- The command "jconsole -J-Xbootclasspath:$JAVA_HOME/jre/lib/rt.jar:$PJA -J-Dawt.toolkit=com.eteks.awt.PJAToolkit" returns to the prompt without displaying anything at all.
- The command "jconsole -J-Xbootclasspath:$JAVA_HOME/jre/lib/rt.jar:$PJA -J-Dawt.toolkit=com.eteks.awt.PJAToolkit -version -J-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment" (i.e. omitting the font directory) gives the same error message as above.

///Best Regards, Jens Carlberg
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2009
Added on Oct 5 2009
0 comments
392 views