jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.75k stars 1.12k forks source link

Cannot run any jme3 applications #1989

Closed bkeys closed 1 year ago

bkeys commented 1 year ago

I am on Fedora 37 ARM64 trying to both run the sample jme3 applications as well as creating a simple application of my own. When I try to run any of them I get this error:

Exception in thread "jME3 Main" java.lang.UnsatisfiedLinkError: The required native library 'openal' is not available for your OS: Linux_ARM64
    at com.jme3.system.NativeLibraryLoader.loadNativeLibrary(NativeLibraryLoader.java:538)
    at com.jme3.system.lwjgl.LwjglContext.loadNatives(LwjglContext.java:239)
    at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:219)
    at java.base/java.lang.Thread.run(Thread.java:833)

I have the openal package installed on my computer and I am able to play audio out of any other applications. I read a thread about unplugging headphones and sound devices, which I did and I am getting the same issue.

pspeed42 commented 1 year ago

You should post trouble shooting questions to the forum where this issue has already been discussed before. You have to disable sound on platforms that don't have OpenAL sound support.

bkeys commented 1 year ago

How do I disable sound?

pspeed42 commented 1 year ago

Set a null audio renderer in your app settings.

bkeys commented 1 year ago

I try to do that in my code, and it says that app.settings is null (debugger confirms this). Here is my code:

package trainshow;

import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.ColorRGBA;

/** Sample 1 - how to get started with the most simple JME 3 application.
 * Display a blue 3D cube and view from all sides by
 * moving the mouse and pressing the WASD keys. */
public class Game extends SimpleApplication {

    public static void main(String[] args){
        Game app = new Game();
        app.settings.setAudioRenderer(null);
        app.start(); // start the game
    }

    @Override
    public void simpleInitApp() {
        Box b = new Box(1, 1, 1); // create cube shape
        Geometry geom = new Geometry("Box", b);  // create cube geometry from the shape
        //Material mat = new Material(assetManager,
        //  "Common/MatDefs/Misc/Unshaded.j3md");  // create a simple material
        //mat.setColor("Color", ColorRGBA.Blue);   // set color of material to blue
        //geom.setMaterial(mat);                   // set the cube's material
        rootNode.attachChild(geom);              // make the cube appear in the scene
    }
}

What am I doing wrong?

stephengold commented 1 year ago

@bkeys please create an account at the JMonkeyEngine Forum and ask your troubleshooting questions there. Your issue will get more attention that way.

Ali-RS commented 1 year ago

I am on Fedora 37 ARM64

lwjgl2 does not support arm64, you should switch to lwjgl3. Replace jme3-lwjgl with jme3-lwjgl3 in build.gradle.

For further troubleshooting questions please ask them on the forum as suggested by others.