Tonyar / xjperf

Automatically exported from code.google.com/p/xjperf
0 stars 0 forks source link

Exception in thread "Main" java.lang.ExceptionInInitializerError #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Unzip Jperf-2.0.2 as root
2. Chmod +x Jperf.sh
3. Run Jperf.sh

What is the expected output? What do you see instead?
I expect to see the Jperf Java Console for the application

What version of the product are you using? On what operating system?
2.0.2

Please provide any additional information below.
Error I receive when running Jperf.sh from the directory is :

Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
   at java.lang.Class.forName(java.lang.String, boolean,
java.lang.ClassLoader)(/usr/lib/libgcj.so.5.0.0)
   at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
   at gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.5.0.0)
   at _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.5.0.0)
   at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean)
(/usr/lib/libgcj.so.5.0.0)
   at __gcj_personality_v0 (/u01/media/jperf-2.0.2/java.version=1.4.2)
   at __libc_start_main (/lib/tls/libc-2.3.4.so)
   at _Jv_RegisterClasses (/u01/media/jperf-2.0.2/java.version=1.4.2)
Caused by: java.lang.UnsupportedOperationException
   at gnu.java.awt.peer.gtk.GdkGraphicsEnvironment.getDefaultScreenDevice()
(/usr/lib/lib-gnu-java-awt-peer-gtk.so.5.0.0)
   at net.nlanr.jperf.JPerf.<clinit>() (Unknown Source)
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0)
   ...8 more

Original issue reported on code.google.com by Jamie.Ga...@gmail.com on 8 May 2009 at 11:47

GoogleCodeExporter commented 8 years ago
this problem occurs when the default JVM is not the official one from SUN
(http://java.sun.com), and JPerf only works with the SUN JVM. On Ubuntu, 
install the
package sun-java6-jre and disable any other JVM (like GCJ or OpenJDK) with the
following command :
# sudo update-alternatives --config java

Original comment by nicolas....@gmail.com on 8 May 2009 at 4:59