I use jmonkey within an eclipse rcp application and everything works right when I am starting it out of my IDE.
The blender files are located inside a assets directory in the eclipse plugin project. Now if I build a productive version of my application then the assests could not be loaded, but the assests,the blender file, are available in the plugin directory. I think it’s a path problem.
This is the how I load my blender files:
assetManager.loadModel(“file1.blend”);
com.jme3.asset.AssetNotFoundException: turntable3.blend
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:374)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:378)
at com.bauerfeind.ma.control.engines.Java3D.createTurnTable(Java3D.java:682)
at com.bauerfeind.ma.control.engines.Java3D.simpleInitApp(Java3D.java:343)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Unknown Source)
I think a eclipse project(plugin) doesn’t work like a normal java jar, where I can use <>.class.getResource(…)
I followed it and managed to load an asset in 30 minutes,despite the fact that I have never used Eclipse for JME development before.I use the default SDK.
@Damien_M
My problem wasn’t to load a asset. My problem was that my model wasn’t found in the final product. In the IDE was everything fine. I’ve posted my Solution
Yeah if you use the default build script all non .j3o objects are excluded from the final distribution automatically.
Anyway you should not use .blend files in your distributable product,as they are not engine-optimized as .j3o models are.
Better to convert them in .j3o format and use them instead.Good luck