Problem with tutorial HelloAssets

Hello, in these days I have been learning about the jMonkeyEngine, but when I finish the third tutorial (https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_asset) and run the program, close the screen and I get the following error:



GRAVE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

com.jme3.asset.AssetNotFoundException: Models/Teapot/Teapot.obj

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:239)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:376)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:386)

at jm3.test.helloworld.HelloAssets.simpleInitApp(HelloAssets.java:29)

at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:230)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)

at java.lang.Thread.run(Thread.java:662)



My video card: Nvidia GT 520



First I write manually the code (for learning) but when I get this error I’ve tried to copy the code on the engine and still getting this error



Sorry for bad english, I speak spanish and something english

To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select “Properties”, go to “Libraries”, press “Add Library” and add the “jme3-test-data” library.



Did you miss this step?

:roll:

@benkibitzer said:
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.

Did you miss this step?


thanks... but I get a new error...

java.lang.IllegalStateException: No loader registered for type "jm3d"
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:226)
at com.jme3.material.Material.(Material.java:128)
at jm3.test.helloworld.HelloAssets.simpleInitApp(HelloAssets.java:30)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:230)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:662)

sorry for the inconvenience

thats cause its “j3md” and not “jm3d” :wink:

@normen said:
thats cause its "j3md" and not "jm3d" ;)


thank yoy and sorry for the inconvenience

@normen said to use the jme3-test-data in the SDK…

<cite>@normen said:</cite> :roll:

But, when I want to load the .j3o file within an application developed with Netbeans and not SDK, where is this library?
I really spent hours thru the doc & forum before asking but I can’t find the solution without your help.

All I get is

Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] com.jme3.asset.AssetNotFoundException

With “Netbeans”, do you mean a separate Netbeans that you installed independently of the SDK, or do you mean the Netbeans install that comes with the SDK?
We’re sometimes a bit sloppy here and use the terms “Netbeans” and “SDK” interchangeably because the SDK is essentially Netbeans + a bunch of plugins + some bundled libraries for the applications.

The documentation contains all information about setting up the jar files in any environment, obviously you have to know your environment to be able to translate the terminology:
https://wiki.jmonkeyengine.org/legacy/doku.php#install

@All, sorry for the wrong use of terminology.

I use Netbeans as independent IDE and I would like to import .xml files created by Blender.
I spent time to find out how to proceed, even going thru the .j3o files.

Finally I get it; thanks to the tutorial page https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:save_and_load and the code example for loading a node I succeed to import the .xml file I created.
I would like to mention that the code shall be changed a little bit for more flexibility:
[java]// String userHome = System.getProperty(“user.home”);
assetManager.registerLocator(szPath, FileLocator.class);
Node loadedNode = (Node)assetManager.loadModel(“Cylinder.mesh.xml”);
loadedNode.setName(“loaded node”);
rootNode.attachChild(loadedNode);[/java]

“user.home” property isn’t the best, i prefer using [java]szPath = System.getProperty(“user.dir”) + “/files/db/”;[/java] giving more flexibility. Note: this run correctly under Linux and W7.