1

The model location has been added to the class path. I also tried importing the model which placed it in a Users folder in the project. The .loadModel statement works in jmonkey but not in java:

rotor1 = assetManager.loadModel("Models/Rotor2/Rotor2.mesh.j3o");

I've tried several alternatives to ("Models/Rotor2/Rotor2.mesh.j3o")

  ("C:/Users/Eugene/Documents/JMonkey/BasicGame1/assets/Models/Rotor2")
  ("Rotor2.mesh.j3o")
  ("Users/Rotor2.mesh.j3o)

The actual exception is shown as:

  Uncaught exception thrown in thread[LWJGL Renderer Thread,5,main]
  AssetNotFoundException: Model/Rotor2/Rotor2.mesh.j3o

I've also tried other variations of the .loadModel statement, with the same error. I could really use some help with this.

Frederic Close
  • 9,389
  • 6
  • 56
  • 67
Gene
  • 91
  • 1
  • 2
  • 9

1 Answers1

0

When you load a model it uses the jME3 asset system to do so. If you use the SDK to create your projects then it will create an assets folder for you and you can place the assets within that. The assets are actually embedded within the JAR of your program.

If you want to load assets from another location such as a folder on the local hard drive you will need to register your own asset locator. You can find this described here:

http://hub.jmonkeyengine.org/wiki/doku.php/jme3:beginner:hello_asset#loading_assets_from_custom_paths

Tim B
  • 40,716
  • 16
  • 83
  • 128