Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Can jMonkeyEngine run with miniJVM? #7

Open
Ali-RS opened this issue Nov 28, 2020 · 3 comments
Open

[Question] Can jMonkeyEngine run with miniJVM? #7

Ali-RS opened this issue Nov 28, 2020 · 3 comments
Labels

Comments

@Ali-RS
Copy link

Ali-RS commented Nov 28, 2020

Hi

Can jMonkeyEngine run on Android and iOS with miniJVM?
If so can you please add a sample project with jMonkeyEngine and miniJVM?

Regards

@Ali-RS Ali-RS changed the title [Question] Can jMonkeyEngine run with MiniJVM? [Question] Can jMonkeyEngine run with miniJVM? Nov 28, 2020
@digitalgust
Copy link
Owner

minijvm using a compact runtime class library, so many third libs maybe unsupported

@joliver82
Copy link

joliver82 commented Sep 13, 2024

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

@digitalgust
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants