question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no bulletjme in java.library.path

See original GitHub issue

sailsman63 reported this issue at the Forum: when TestChooser is run from the command line using gradlew run, the bulletjme native library isn’t loaded.

I downloaded and unzipped the native snapshot from https://dl.bintray.com/jmonkeyengine/files/a4c694ba36258af5c6ce7823f4bdacc424988557/jme3-natives.zip

It looks like the bulletjme native library for my platform is in bullet/windows/x86_64/bulletjme.dll, but the loader is looking for native/windows/x86_64/bulletjme.dll.

$ git clone https://github.com/jMonkeyEngine/jmonkeyengine.git
Cloning into 'jmonkeyengine'...
remote: Enumerating objects: 52, done.
remote: Counting objects: 100% (52/52), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 105351 (delta 13), reused 29 (delta 9), pack-reused 105299
Receiving objects: 100% (105351/105351), 816.27 MiB | 7.07 MiB/s, done.
Resolving deltas: 100% (52413/52413), done.

Stephen@SGold2012 MINGW64 /s/Git
$ cd jmonkeyengine

Stephen@SGold2012 MINGW64 /s/Git/jmonkeyengine (master)
$ ./gradlew run

> Configure project :
Full Version: 2c6161ecd8e7d7ced3752724b220feca5aabced1
POM Version: 2c6161ecd8e7d7ced3752724b220feca5aabced1
Use natives snapshot: https://dl.bintray.com/jmonkeyengine/files/a4c694ba36258af5c6ce7823f4bdacc424988557/jme3-natives.zip
No filter set. build for all

> Task :jme3-core:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-core:compileGroovy NO-SOURCE
> Task :jme3-core:updateVersionPropertiesFile
> Task :jme3-core:processResources
> Task :jme3-core:classes
> Task :jme3-core:jar

> Task :jme3-desktop:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-desktop:compileGroovy NO-SOURCE
> Task :jme3-desktop:processResources
> Task :jme3-desktop:classes
> Task :jme3-desktop:jar
> Task :jme3-effects:compileJava
> Task :jme3-effects:compileGroovy NO-SOURCE
> Task :jme3-effects:processResources
> Task :jme3-effects:classes
> Task :jme3-effects:jar

> Task :jme3-blender:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :jme3-blender:compileGroovy NO-SOURCE
> Task :jme3-blender:processResources
> Task :jme3-blender:classes
> Task :jme3-blender:jar

> Task :jme3-terrain:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-terrain:compileGroovy NO-SOURCE
> Task :jme3-terrain:processResources
> Task :jme3-terrain:classes
> Task :jme3-terrain:jar

> Task :jme3-bullet:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-bullet:compileGroovy NO-SOURCE
> Task :jme3-bullet:processResources NO-SOURCE
> Task :jme3-bullet:classes
> Task :jme3-bullet:jar
> Task :jme3-bullet-native:compileJava NO-SOURCE
> Task :jme3-bullet-native:compileGroovy NO-SOURCE
> Task :jme3-bullet-native:processResources NO-SOURCE
> Task :jme3-bullet-native:classes UP-TO-DATE
> Task :jme3-bullet-native:jar

> Task :jme3-jogg:compileJava
Note: S:\Git\jmonkeyengine\jme3-jogg\src\main\java\com\jme3\audio\plugins\OGGLoader.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-jogg:compileGroovy NO-SOURCE
> Task :jme3-jogg:processResources NO-SOURCE
> Task :jme3-jogg:classes
> Task :jme3-jogg:jar
> Task :jme3-jogl:compileJava
> Task :jme3-jogl:compileGroovy NO-SOURCE
> Task :jme3-jogl:processResources NO-SOURCE
> Task :jme3-jogl:classes
> Task :jme3-jogl:jar
> Task :jme3-lwjgl:compileJava
> Task :jme3-lwjgl:compileGroovy NO-SOURCE
> Task :jme3-lwjgl:processResources NO-SOURCE
> Task :jme3-lwjgl:classes
> Task :jme3-lwjgl:jar

> Task :jme3-networking:compileJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-networking:compileGroovy NO-SOURCE
> Task :jme3-networking:processResources NO-SOURCE
> Task :jme3-networking:classes
> Task :jme3-networking:jar

> Task :jme3-niftygui:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :jme3-niftygui:compileGroovy NO-SOURCE
> Task :jme3-niftygui:processResources
> Task :jme3-niftygui:classes
> Task :jme3-niftygui:jar

> Task :jme3-plugins:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-plugins:compileGroovy NO-SOURCE
> Task :jme3-plugins:processResources NO-SOURCE
> Task :jme3-plugins:classes
> Task :jme3-plugins:jar
> Task :jme3-testdata:compileJava NO-SOURCE
> Task :jme3-testdata:compileGroovy NO-SOURCE
> Task :jme3-testdata:processResources
> Task :jme3-testdata:classes
> Task :jme3-testdata:jar

> Task :jme3-examples:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jme3-examples:compileGroovy NO-SOURCE
> Task :jme3-examples:processResources
> Task :jme3-examples:classes
> Task :jme3-examples:jar
> Task :jme3-examples:sourcesJar
> Task :jme3-examples:writeFullPom
> Task :jme3-examples:assemble
> Task :jme3-examples:compileTestJava NO-SOURCE
> Task :jme3-examples:compileTestGroovy NO-SOURCE
> Task :jme3-examples:processTestResources NO-SOURCE
> Task :jme3-examples:testClasses UP-TO-DATE
> Task :jme3-examples:test NO-SOURCE
> Task :jme3-examples:check UP-TO-DATE
> Task :jme3-examples:build
> Task :jme3-examples:run
bullOct 31, 2019 1:48:58 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 2c6161ecd8e7d7ced3752724b220feca5aabced1
 * Branch: master
 * Git Hash: 2c6161e
 * Build Date: 2019-10-31
Oct 31, 2019 1:48:58 PM jme3test.TestChooser$2 run
SEVERE: main() method had exception: jme3test.bullet.TestAttachDriver
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at jme3test.TestChooser$2.run(TestChooser.java:270)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.UnsatisfiedLinkError: The required native library 'bulletjme' was not found in the classpath via 'native/windows/x86_64/bulletjme.dll'. Error message: no bulletjme in java.library.path
        at com.jme3.system.NativeLibraryLoader.loadNativeLibrary(NativeLibraryLoader.java:598)
        at com.jme3.system.JmeDesktopSystem.initialize(JmeDesktopSystem.java:348)
        at com.jme3.system.JmeDesktopSystem.newContext(JmeDesktopSystem.java:271)
        at com.jme3.system.JmeSystem.newContext(JmeSystem.java:159)
        at com.jme3.app.LegacyApplication.start(LegacyApplication.java:461)
        at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
        at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
        ... 6 more

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
MeFisto94commented, Jan 27, 2020

This is #1260, the native libraries aren’t added when the run task is run. Running assemble once first works around this problem.

This is related to the following: run invokes compileJava on the submodules much like assemble does, but it does not depend on assemble. In previous jme versions we had one native archive per module and thus could chain the process to the module-specific-assemble tasks, which worked for run, but we can’t do that anymore.

Actually now that I re-think of #1260, we should just update the PR and make the run task just also depend on the natives task. Simple fix.

Also we should add gradlew run to the Readme of the repo, I think it’s not broadly advertised that you can directly start with jme and it’s examples by just checking out the repo and typing gradlew run.

1reaction
stephengoldcommented, Nov 5, 2019

@tlf30 since the failures you saw were not consistent, I wonder if they might be due to network issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Native bullet library not found - jMonkeyEngine Hub
So I'm trying to add the native libraries to the IntelliJ IDEA project. ... Error message: no bulletjme in java.library.path at com.jme3.system.
Read more >
java.lang.UnsatisfiedLinkError: no cplex1290 in java.library.path
The path passed to java.library.path should be the absolute path to the directory containing cplex1290.dll not cplex.jar .
Read more >
|WORK| Intellij Add To Java Library Path | Peatix
So I'm trying to add the native libraries to the IntelliJ IDEA project. Easy enough, go to the ... Error message: no bulletjme...
Read more >
getting no opendnp3java in java.library.path error
I am executing OutstationDemo example but it is not working due to below error. Exception in thread "main" java.lang.UnsatisfiedLinkError: no opendnp3java ...
Read more >
Understanding Native Libraries - Oracle Help Center
Most often, to include the components in the java.library.path, ... It is not recommended that library paths be added as global shell or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found