javajmonkeyengine

JMonkey 3.5.2 SDK: How to add a library to the project?


How to add an existing library to my project in JMonkeyEngine SDK 3.5.2?

I'm watching this: https://www.youtube.com/watch?v=h6Xl3MRjMLM

I do not have Libraries folder in the project tree, so I was finding another way. I did find Tools -> Libraries, but it is just a list of libraries and I can't add a library from there to my project.

I searched JMonkey wiki, and it says:

RMB select your project and select “Properties”.

Select “Libraries” on the left and then press “Add Library”.

Select the library from the list and press OK

But when going to Properties, I do not have Libraries there on the left.

So what am I doing wrong? I want to add standard jme3-test-data library to my project so I can do what the guy did in his video.


Solution

  • Are you using the gradle project template? It doesn't have 'libraries', per se. You add them as 'dependencies' in build.gradle.

    If you open build.gradle you can see

    dependencies {
      implementation "org.jmonkeyengine:jme3-core:$jmeVer"
      ...
    }
    

    Add

    implementation "org.jmonkeyengine:jme3-test-data:$jmeVer"
    

    (The video explains how to add libraries to the 'Ant' project template)