Stuck with Getting Started with JME3 (3) - Hello Assets

I’m having issues getting the town scene to load under the exercises section.



Actually, it seems like the scenegraph isn’t updating at all (even after cleaning and rebuilding).



For example, if I comment out the code for the ninja, clean, rebuild and run, the ninja still shows up.

Yeah, after tinkering around a bit more with stuff, it seems like the first build of my java class is all that ever shows up, even if I change the code and clean and rebuild my main project. Using jMP, restarting it doesn’t help either.

Update jMP to the latest Nightly (F1: Help) http://code.google.com/p/jmonkeyengine/issues/detail?id=206

Awesome, thanks. Solved my problem. :smiley:



I noticed another problem that’s related strictly to the tutorial though.



The second last part of the Hello Assets tutorial tells you:

  1. Remove the code from the previous exercise.
  2. Move the unzipped town/ directory into the assets/Scenes/ directory of your project.



    But if you do that you’ll be missing some files like main.material and level.mesh.xml. (all the necessary files can be found in the .zip file, just not in the town/ folder)



    Also, the ziplocator is throwing a fit. :frowning:



    [java] assetManager.registerLocator(“town.zip”, ZipLocator.class.getName());

    Spatial gameLevel = assetManager.loadModel(“main.scene”);

    gameLevel.setLocalTranslation(0, -5.2f, 0);

    gameLevel.setLocalScale(2);

    rootNode.attachChild(gameLevel);[/java]



    Replacing the other code for loading the town w/ that throws up this error during the build:


cannot find symbol
symbol : class ZipLocator
location: class jme3test.helloworld.HelloAssets
assetManager.registerLocator("town.zip", ZipLocator.class.getName());
1 error

I guess it depends on your unzip tool what it does, if it creates a folder with the same name as the zip then the tutorial is right. Maybe it should read “the unzipped contents”. For the cannot find symbol error: you have to import the class. (Shift-Ctrl-I)

Nah. The zip file contains all the files in the main folder of the zip file, but inside the zip file is also the town/ folder with most of the same files but not all. So when I extracted just the town/ folder into the scene location, those files were missing too.



Also, thanks a bunch for the Shift-Ctrl-I tip. I can already tell it’s going to be super useful. :smiley:

– Moved to a separate topic: http://hub.jmonkeyengine.org/groups/import-assets//forum/topic/failed-to-find-loader-town-zip/



I’m running against the latest nightly build of jME3 (2010-11-21). I get an exception on



[java]assetManager.registerLocator(“town.zip”, ZipLocator.class.getName());[/java]



[java]Nov 21, 2010 12:42:57 PM com.jme3.asset.DesktopAssetManager registerLoader

WARNING: Failed to find loader: town.zip

java.lang.ClassNotFoundException: town.zip

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:169)

at com.jme3.asset.DesktopAssetManager.registerLoader(DesktopAssetManager.java:112)

at mygame.Main.simpleInitApp(Main.java:58)

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

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

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

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

Nov 21, 2010 12:42:57 PM com.jme3.asset.DesktopAssetManager loadAsset

WARNING: Cannot locate resource: main.scene[/java]



town.zip is in the root of my project directory. Any clues?