Open Ali-RS opened 3 years ago
minijvm using a compact runtime class library, so many third libs maybe unsupported
I confirm, I tried to run my jme3 game in linux using minijvm and it doesn't have all required classes (maybe there're some classes required by jme3 and other by my code)
Output:
[INFO]jvm inited
class not found:javax.imageio.ImageIO
method not exist :javax/imageio/ImageIO.read(Ljava/io/InputStream;)Ljava/awt/image/BufferedImage;
class not found:java.applet.Applet
class not found:java.applet.Applet
method not exist :java/applet/Applet.getAppletContext()Ljava/applet/AppletContext;
class not found:java.applet.AppletContext
method not exist :java/applet/AppletContext.getApplet(Ljava/lang/String;)Ljava/applet/Applet;
class not found:java.applet.Applet
method not exist :java/applet/Applet.getParameter(Ljava/lang/String;)Ljava/lang/String;
class not found:javax.swing.JOptionPane
method not exist :javax/swing/JOptionPane.showMessageDialog(Ljava/awt/Component;Ljava/lang/Object;Ljava/lang/String;I)V
class not found:java.lang.Thread$UncaughtExceptionHandler
class not found:java.util.concurrent.Callable
class not found:java.lang.management.ManagementFactory
method not exist :java/lang/management/ManagementFactory.getRuntimeMXBean()Ljava/lang/management/RuntimeMXBean;
class not found:java.lang.management.RuntimeMXBean
method not exist :java/lang/management/RuntimeMXBean.getInputArguments()Ljava/util/List;
class not found:java.util.concurrent.Callable
class not found:java.awt.Toolkit
method not exist :java/awt/Toolkit.getDefaultToolkit()Ljava/awt/Toolkit;
class not found:java.awt.Toolkit
method not exist :java/awt/Toolkit.getScreenSize()Ljava/awt/Dimension;
class not found:sun.misc.VM
method not exist :sun/misc/VM.maxDirectMemory()J
field not found java/util/logging/Level.OFF
class not found:java.awt.Dimension
field not exist :java/awt/Dimension.widthI
field not found java/awt/Dimension.width
class not found:java.awt.Dimension
field not exist :java/awt/Dimension.widthI
class not found:java.awt.Dimension
field not exist :java/awt/Dimension.heightI
field not found java/awt/Dimension.height
class not found:java.awt.Dimension
field not exist :java/awt/Dimension.heightI
class not found:java.util.concurrent.Future
class not found:java.util.concurrent.Callable
[INFO]main thread start
[JDWP]jdwp listening (port:8000) ...
class not found:java.util.concurrent.ConcurrentHashMap
method not exist :java/util/concurrent/ConcurrentHashMap.<init>()V
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.get(Ljava/lang/Object;)Ljava/lang/Object;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.values()Ljava/util/Collection;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.containsKey(Ljava/lang/Object;)Z
class not found:java.util.concurrent.ConcurrentHashMap
[INFO]main thread over 27eb2c0 , return 1 , spent : 129
[INFO]jvm destoried
Also tested a basic jme3 app (the default project created from the SDK) and there's still some classes missing:
[INFO]jvm inited
class not found:java.util.concurrent.Future
class not found:java.util.concurrent.Callable
[INFO]main thread start
[JDWP]jdwp listening (port:8000) ...
class not found:java.util.concurrent.ConcurrentHashMap
method not exist :java/util/concurrent/ConcurrentHashMap.<init>()V
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.get(Ljava/lang/Object;)Ljava/lang/Object;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.values()Ljava/util/Collection;
class not found:java.util.concurrent.ConcurrentMap
method not exist :java/util/concurrent/ConcurrentMap.containsKey(Ljava/lang/Object;)Z
class not found:java.util.concurrent.ConcurrentHashMap
[INFO]main thread over 1c40a10 , return 1 , spent : 463
[INFO]jvm destoried
I think it's weird because ConcurrentMap and ConcurrentHashMap exist in minijvm -> https://github.com/digitalgust/miniJVM/blob/master/minijvm/java/src/main/java/java/util/concurrent/ConcurrentMap.java https://github.com/digitalgust/miniJVM/blob/master/minijvm/java/src/main/java/java/util/concurrent/ConcurrentHashMap.java
minijvm has fewer than 500 system classes. To support the jme3 engine, a large number of library classes need to be added. In your code, you used ConcurrentHashMap, which exists, but due to the incomplete classes in the java.util.concurrent package, it may result in an error saying ConcurrentHashMap is not found. In the future, we can open a repository to add all the classes needed for jme3.
Hi
Can jMonkeyEngine run on Android and iOS with miniJVM? If so can you please add a sample project with jMonkeyEngine and miniJVM?
Regards