[Solved] Deploy Ubuntu x64: libjvm.so is not found in the bundled runtime


I’m trying to deploy my attempt of game :slight_smile: and I’m facing some difficult.

I would like to avoid users to install JAVA (the whole jMonkey SDK works without asking me to install it, so I think is possible :slight_smile: )

Following this tutorial Deploy Wiki I made the JAR.
The Deployed JAR file run in my VM (where i installed the adoptopenjdk) with “java -jar nameFile.jar”

The next step was to create a self contained output but I didn’t found how to do it and searching for similar questions let me discover this tool:
New desktop deployment for 3.1
but it failed with the error in the title of the topic and during the deploy I learned that “Warning: Nashorn engine is planned to be removed from a future JDK release”.
In other topics I found many reference to Gradle but as newbie I don’t know how to make it work.

So I’m facing two scenarios each one with some questions:
(Scenario 1)
Moving forward with my attempt, is there an easy way to release my game in a cross-platform, self contained way?
Yes, there is :slight_smile: I successfully used directly this packr
Using the terminal I was able to figure out that in my case the issue was related to a failed attempt to access to the shared folder file from my VM. Now from my host (without Java installed I can play the game). Hope it will help to someone and save a couple of days :stuck_out_tongue:
Now I can move happily to discover alternative.

(Scenario 2)
Moving to Gradle,

  • why it create two projects? (BasicGradleGame with sources and one with the asset)
  • is there something i can write into the build.gradle file in other to have the output I’m looking for?

Sorry to bother you but I can’t figure out how to solve it.

Some additional info:

  • I installed into the VM the adoptopenjdk instead the openjdk otherwise I have this error:
    Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)’ failed!
  • The Nashorn engine don’t download JRE by it self so I manually downloaded from here (Installation | AdoptOpenJDK - Open source, prebuilt OpenJDK binaries) and place where expected by the tool
  • Ubuntu 20.04
  • Product Version: jMonkeyEngine SDK v3.3.2-stable
  • Updates: jMonkeyEngine SDK is updated to version NetBeans 8.2 Patch 2
  • Java: 11.0.6; OpenJDK 64-Bit Server VM 11.0.6+10
  • Runtime: OpenJDK Runtime Environment 11.0.6+10
    System: Linux version 5.4.0-66-generic running on amd64; UTF-8; en_US (jmonkeyplatform)


I don’t use the SDK so I can’t comment on its deploy process - I take a different route, using Gradle + jlink to build a redistributable JVM and then bundling my code + libs with that JVM for distribution. It’s not hard to do if you’re familiar with Gradle, but if you’re just getting started I suggest sticking to the SDK deployment for now. If you’re interested in this approach, I’d be happy to share relevant Gradle snippets.

Gradle is a build tool - it handles compiling, managing dependencies, packaging, etc. etc. It’s very powerful but takes some getting used to. I’d highly recommend spending some time getting familiar with it, as it will save you an enormous amount of time later on. I’ve worked with quite a few build systems, and none of them come close to being as easy or powerful as Gradle.

As far as your Scenario 2, the two projects are created to keep code & assets (3D models, textures, etc) separate. In JME, all the assets are typically bundled into an assets.jar file, so keeping them in separate projects makes it easy for Gradle to build the assets jar and then pull it into the main project build for distribution.

RE Nashorn, it’s been deprecated - if you’re not using it in your project, there’s no need to install it at all.

1 Like

Thank you for the answer Daniel and thank you for your availability to sharing Gradle snippets, I really appreciate :slight_smile:

Ok, this is now clear.

I will start from the guide on Gradle site.
I would like to keep using the SDK because I set up the game in order to create levels using only ( or at least mainly) the SceneComposer and the Custom Controls, the code have care to make it playable :slight_smile:

I will try to figure out how to release the game with Grade (I hope without big change in the work I already done) , if I will be capable I will write here an “how to” for beginner :smiley:

1 Like