I originally wrote this post as a question on how to make this work. But, while I was writing the post I figured it out. I am posting this here so anyone else running into the same issue may be saved this fussyness.
I would like to use the newest code from 3.1 for a project I am working on. I know it can be unstable – I’m not concerned with that. I would like to set this up in IntelliJ Idea. With 3.0, I simply downloaded the nightly build from here and then added the necessary JARs to my classpath. With 3.1, the nightly builds have stopped so I need to build it myself from GitHub. To do this, I ran the following commands (on Ubuntu Desktop 14.04.2 LTS x64 if revelvent).
git clone email@example.com:jMonkeyEngine/jmonkeyengine.git
ant -f ./sdk build-zip
I then accessed the jar file at /path/to/cloned/repository/sdk/dist/jmonkeyplatform.zip and then added everything under /jmonkeyplatform/jmonkeyplatform/libs/ that isn’t labeled sources or javadoc to my classpath (IntelliJ Idea did, however, add these and mark them as sources and javadocs). When I do this and I attempt to run a program that just extends SimpleApplication with a main method and empty simpleInitApp() the resolution window works correctly but when I actually start the game I get the following error:
Exception in thread "jME3 Main" java.lang.UnsatisfiedLinkError: The required native library 'openal64' was not found in the classpath via 'native/linux/libopenal64.so'. Error message: no openal64 in java.library.path
I checked to ensure that the lwjgl natives were in the classpath. They wearn’t I added three jars called jwjgl-platform-2.9.2-natives-<os-name>.jar for Windows, OSX, and Linux. This then triggered the following error:
Exception in thread "LWJGL Renderer Thread" java.lang.UnsatisfiedLinkError: The required native library 'bulletjme' was not found in the classpath via 'native/windows/x86_64/bulletjme.dll'
I solved this by adding a file called jme3-bullet-native-3.1.0-SNATSHOT.jar This is where my biggest trip-up was since I was looking for something named bullet and there was nothing starting with B in the alphabetical order listing.
I think you’re making life a bit difficult for yourself. Gradle solves pretty much all of these dependency issues if you use it. Right now i presume you are straight up adding jars, which means also adding the engine dependencies too, which would normally be pulled automatically by gradle.
Then the best would be to invoke gradlew -PbuildJavaDoc=true installand specify the engine as dependency in the gradle project (assuming they use gradle), there are actually gradle templates for things like the assets.jar
Maybe the sources you are looking for are included in the jar files?
There is one, as I said if you call gradlew install, they will be installed to your local maven repository, which on linux is ~/.m2, and on Windows might be in AppData, or in the User Profile
Structure looks as follows:
23552 -rw-rw-r-- 1 marc marc 24113427 Sep 13 22:04 jme3-vr-3.2.0-fix_blender_load_hdr-SNAPSHOT.jar
3640 -rw-rw-r-- 1 marc marc 3723348 Sep 13 23:21 jme3-vr-3.2.0-fix_blender_load_hdr-SNAPSHOT-javadoc.jar
4 -rw-rw-r-- 1 marc marc 2775 Sep 13 19:40 jme3-vr-3.2.0-fix_blender_load_hdr-SNAPSHOT.pom
23236 -rw-rw-r-- 1 marc marc 23793309 Sep 13 19:40 jme3-vr-3.2.0-fix_blender_load_hdr-SNAPSHOT-sources.jar
4 -rw-rw-r-- 1 marc marc 335 Sep 13 23:21 maven-metadata-local.xml
23552 -rw-rw-r-- 1 marc marc 24113436 Sep 20 00:05 jme3-vr-3.2.0-fixed_NPE_during_saving_matparam-SNAPSHOT.jar
3636 -rw-rw-r-- 1 marc marc 3721921 Sep 20 00:05 jme3-vr-3.2.0-fixed_NPE_during_saving_matparam-SNAPSHOT-javadoc.jar
4 -rw-rw-r-- 1 marc marc 2823 Sep 20 00:05 jme3-vr-3.2.0-fixed_NPE_during_saving_matparam-SNAPSHOT.pom
23236 -rw-rw-r-- 1 marc marc 23793309 Sep 20 00:05 jme3-vr-3.2.0-fixed_NPE_during_saving_matparam-SNAPSHOT-sources.jar
4 -rw-rw-r-- 1 marc marc 347 Sep 20 00:05 maven-metadata-local.xml
23552 -rw-rw-r-- 1 marc marc 24113406 Sep 19 14:19 jme3-vr-3.2.0-SNAPSHOT.jar
3640 -rw-rw-r-- 1 marc marc 3724676 Sep 19 14:19 jme3-vr-3.2.0-SNAPSHOT-javadoc.jar
4 -rw-rw-r-- 1 marc marc 2691 Sep 9 13:59 jme3-vr-3.2.0-SNAPSHOT.pom
23236 -rw-rw-r-- 1 marc marc 23793309 Sep 9 13:59 jme3-vr-3.2.0-SNAPSHOT-sources.jar
4 -rw-rw-r-- 1 marc marc 314 Sep 19 14:19 maven-metadata-local.xml
So this means I have 3 custom engine builds in my repo.
Hint: If you have a gradle project, you could use mavenLocal() to pick these up, it’s actually very convenient, no copying of jar’s and all.
Asside from that, have you tried gradlew assemble?
There is no gradle task install in NetBeans on windows. The only way I can see to have one is to create a custom task since there is no command line option that’s obvious.
Yes, several times.
I explored in the file view of NetBeans and don’t know just what its assembling. It spams hundreds of lines into the log file, and at end says it was BUILD SUCCESSFUL.
I went through .m2 folder and theres nothing about jmonkeyengine that I can find.
I searched my drive and the only jmonkeyengine anything is located in NetBeans project folder.
The project properties shows zilch inside it. Nothing there.
I see that the ‘install’ task for the main project doesn’t show up in the IDE. I suspect this is a limitation of the Gradle Support plugin. However, if you open the sub-projects, you’ll find that each of them has an ‘install’ task. You might try installing the sub-projects you need, one by one.
Or you could (as I have done) install a command-line tool such as MINGW64 on your system. The version I use came with a package of Git tools I downloaded from https://git-scm.com/ I find it useful because the Git/Gradle support in Netbeans 8 is not as powerful as the command line. So when a Unix expert tells me to ‘git push origin’ or ‘git reset --hard’ I don’t have figure out how to perform that via the Netbeans IDE; I just paste onto the command line. Similarly, I can type gradle/gradlew commands in MINGW64, provided I configure the environment first: