Eclipse + jME3 + Android + JNI/NDK

The wiki is in need of a helping hand for this page.

It requires someone familiar with these programs_Eclipse + jME3 + Android + JNI/NDK.

If you can help you do not need to know anything about the wiki or asciidoctor. Just post your changes here in plain text and I can take it from there.

1 Like

Also note that Android Studio isn’t Eclipse based anymore but IntelliJ, so a guide for IntelliJ (if not already in place, don’t know) would also be nice :slight_smile:


Yep, this page is in need of serious love.


Hi Guys,

Well I do know all of the above and am just now looking at the link, and will see what I can do and will update you on that with the caveat that I “absolutely” (no offence to anyone) can not stand eclipse though have been forced to use it in contracts so I’ll give it a try but no promises…

Thanks for bringing this to light!!!



Not sure why you bring this up since Eclipse isn’t used anymore.

1 Like

If this needs to be changed into a different page altogether that’s ok to. We have a eclipse page for building the engine, but nothing for Android so that would be intellij?

Edit: That would mean this page is completely worthless now then?

1 Like

There are two roads here. Android studio and the SDK. I have experience enough to help with the studio side. Are we going to document both routes?

Android studio is intellij, yes.

1 Like

But Android Studio used to be Eclipse before.

The SDK currently only works partially, due to bugs in Netbeans which aren’t resolved yet and I also think the folks using Gradle, because the “NBAndroid” (Netbeans Android Integration Plugin) might be using Ant, could not build for Android either.

So in the short term the way to go is using the SDK for a project and then importing/converting it to Android Studio to deploy.

1 Like

We have the SDK part here but I would think its not correct either based off what @Darkchaos is saying.

A intellij specific page would be perfect and I can make it wiki usable for you if you want to just write the text for it. Can either message me on it or post it here.

I think the community would be glad to have both based on the popularity of Android the amount of posts I have seen.

1 Like

Sure. I’ll write it here and we can go from there. In android studio it’s just a matter of invoking an android harness class as opposed to a main(string… args) static method. Its actually really simple. Ill write it. Oh. Reminder to self. Xml files.

1 Like

Because I was TRYING to help…NOT NIT PICKING!!!

1 Like

Well, my point was you were essentially complaining about having to use Eclipse to help… but you don’t have to use Eclipse to help since Eclipse isn’t used anymore.

I just figure maybe you misunderstood.

At least, that’s how I interpreted this:

Which is fine because you won’t need to use Eclipse.

1 Like

Aye that you did!
Good day!

1 Like

Will ammend as time allows:

Steps to create a working environment for Jmonkey in Android Studio.


  1. Create a class that extends SimpleApplication
  2. Create a class that extends and reference our SimpleApplicaton extended class in the provided protected fields.
  3. Declare the class that extended AndroidHarness in AndroidManifest.xml

An example class that extends SimpleApplication. Note that we have no static void main(String[] args) but we can still use the noArgs class constructor.

package com.jayfella.motorunner;

public class JmeGame extends SimpleApplication {

    public JmeGame() {
        // super(new AppState[0]);

    public void simpleInitApp() {

        // 0, 0, 0 reference
        Box box = new Box(1, 1, 1);
        Geometry geom = new Geometry("box", box);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", ColorRGBA.Blue);


An example file that extends AndroidHarness. Note that we reference our SimpleApplication extended class here and use protected fields to set any AppSettings.

package com.jayfella.motorunner;

import android.os.Bundle;


import java.util.logging.Level;
import java.util.logging.LogManager;

 * Created by James on 12/01/2018.

public class JmeHarness extends AndroidHarness {

    public JmeHarness() {

        // Set the desired EGL configuration
        eglBitsPerPixel = 24;
        eglAlphaBits = 0;
        eglDepthBits = 16;
        eglSamples = 0;
        eglStencilBits = 0;

        // Set the maximum framerate
        // (default = -1 for unlimited)
        frameRate = -1;

        // Set main project class (fully qualified path)
        // the class that extends SimpleApplication
        appClass = "com.jayfella.motorunner.JmeGame";

        // Set input configuration settings
        joystickEventsEnabled = true;
        keyEventsEnabled = true;
        mouseEventsEnabled = true;

        // Set application exit settings
        finishOnAppStop = true;
        handleExitHook = true;
        exitDialogTitle = "Do you want to exit?";
        exitDialogMessage = "Use your home key to bring this app into the background or exit to terminate it.";

        // Set splash screen resource id, if used
        // (default = 0, no splash screen)
        // For example, if the image file name is "splash"...
        //     splashPicID = R.drawable.splash;
        splashPicID = 0;
        // splashPicID = R.drawable.jme_white;

        // Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)


    public void onCreate(Bundle savedInstanceState) {


Declare the class to launch on start in ./manifests/AndroidManifest.xml

<manifest xmlns:android=""


       // the entry point class that extends
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


    <!-- Tell the system that you need ES 2.0. -->

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.VIBRATE"/>


The XML file is essentially the start point for all android applications. The XML file launches the JmeHarness class that you provided. The JmeHarness class sets AppSettings and states the class that extends SimpleApplication. The SimpleApplication class is then invoked with the given settings. Game on.

1 Like

I saw this, just keep posting what you want in it. Ill get to it shortly.