3

I have compiled jamvm.I downloaded blocky for github and extracted it. Then I followed some instructions here and when I execute it:

Error: jamvm VM not supported

So I modified ./blocky-jamvm from

java -jar -Xmx128M -Djava.library.path=lwjgl/native/linux:/opt/vc/lib -classpath lwjgl/jar/lwjgl.jar:lwjgl/jar/lwjgl_test.jar:lwjgl/jar/lwjgl_util.jar:slick-util.jar:ge-framework.jar:ge-demo.jar ge.demo.game.Blocky $1

to

jamvm -jar -Xmx128M -Djava.library.path=lwjgl/native/linux:/opt/vc/lib -classpath lwjgl/jar/lwjgl.jar:lwjgl/jar/lwjgl_test.jar:lwjgl/jar/lwjgl_util.jar:slick-util.jar:ge-framework.jar:ge-demo.jar ge.demo.game.Blocky $1

Error:

Exception occurred while VM initialising.
java/lang/NoClassDefFoundError: java/lang/Class

UPDATE: I installed gnu classpath and now:

(process:1110): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library `lwjgl' not found (as file `liblwjgl.so') in gnu.classpath.boot.library.path and java.library.path
   at java.lang.Runtime.loadLibrary(Runtime.java:763)
   at java.lang.System.loadLibrary(System.java:670)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   at java.security.AccessController.doPrivileged(AccessController.java:96)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
   at org.lwjgl.Sys.loadLibrary(Sys.java:95)
   at org.lwjgl.Sys.<clinit>(Sys.java:112)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
   at ge.framework.render.GLES20Renderer.createDisplay(GLES20Renderer.java:126)
   at ge.demo.game.Blocky.start(Blocky.java:166)
   at ge.demo.game.Blocky.main(Blocky.java:1680)

I am running Arch Linux Arm hardfloat. Am I missing something here? Are there differences between the debian icedtea-7-jre-jamvm and vanilla jamvm?

ArchHaskeller
  • 1,435
  • 12
  • 35

1 Answers1

3

The debian icedtea-7-jre-jamvm is designed to be used with OpenJDK. JamVM is then compiled into a libjvm.so. The JamVM libjvm.so can be used instead of the OpenJDK Hotspot libjvm.so.

"vanilla" jamvm is to be used with gnu classpath You need to compile and install the classpath package if you want to use this combination.

To fix the "Error: jamvm VM not supported" You need to recompile the Arch Linux java7-openjdk package and pass --enable-jamvm or --with-additional-vms=jamvm to the IcedTea configure. This will build jamvm and patch the OpenJDK 7 source code to disable some hotspot specific sun.misc.PerfCounter debug code, this will allow JamVM to be used in combination with OpenJDK 7.

For OpenJDK 6 it is still possible to compile JamVM manually into a libjvm.so and use it without first patching the OpenJDK 6 sourcecode. build instructions: http://labb.zafena.se/?p=576 The compiled libjvm.so is then placed in jdk/jre/lib/arm/jamvm/libjvm.so The file jre/lib/arm/jvm.cfg contains a list of "KNOWN" jvm on your system. -jamvm KNOWN must exist inside this list for java -jamvm to operate.

xranby
  • 361
  • 2
  • 4