After jme 2.X installation, eclipse won't update project

Hi all,



In order to use HottBJ, I've spent the last few days installing jme 2.x over jme 2.0. After following the tutorial, I manage to compile and run the examples from the jME project. However, when trying to run my project, I get a first error like this:


java.lang.ClassCastException: com.jme.scene.Node cannot be cast to com.jme.scene.TriMesh
   at characters.Character.load(Character.java:50)
   at characters.Character.<init>(Character.java:29)
   at dungeon.InsideMap.simpleInitGame(InsideMap.java:141)
   at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:545)
   at dungeon.InsideMap.initGame(InsideMap.java:316)
   at com.jme.app.BaseGame.start(BaseGame.java:74)
   at dungeon.InsideMap.main(InsideMap.java:63)



A mistake of mine that I correct. But then, the error appear again. At some point I put the "Line 50" as a comment, but STILL, I get the SAME message. I even try to delete the class within eclipse, BUT STILL, the same message appears again and then when I click on the link, it says that the class doesn't exist (no wonder ...). I'm reaching a certain level of frustration about this, so I'd really appreciate someone's help on that, before I just start to totally reinstall everything ...

Note: Since the installation of jme 2.x, I notice that in eclipse package explorer, the root of my project (the little blue folder with a 'J' on it) is marked with a red cross (the error red cross). However NONE of my class within this project is marked with the same red cross. And it's exactly the same for the "jme" project. I tried to rebuild or refresh both projects without much success ...


Thanks a lot,
Adrien

Total guess in the dark here, but maybe eclipse isn't set to auto-build. Project -> Build Automatically, is it checked?

It actually wasn't checked, however even when checking it, I get the same error. Just in case, I attach the code at the end of the message. I'm trying to download the new jdk 1.6_v17 (I think I had the version 1.6_v6 who knows, it may help …). Also, for setting up my project to use jme 2.x, instead of what was said in the tutorial (add library "JME2_Required" in the build path), I actually did it the old way (of jme 2.0) and added the jme project itself to the build path (with the 'library' way, my project, built around jme 2.0 didn't want to compile)



package characters;

import java.net.URL;

import rooms.RoomsManager;

import com.jme.math.Quaternion;
import com.jme.math.Vector3f;
import com.jme.scene.Node;
import com.jme.scene.Spatial;
import com.jme.scene.TriMesh;
import com.jme.util.export.xml.XMLImporter;

public class Character {

   public Vector3f position, speed;
   public Quaternion direction;
   public float maxSpeed;
   protected XMLImporter xmlImporter = XMLImporter.getInstance();
   
   public Spatial theMesh;
   
   private URL modelUrl = Character.class.getClassLoader().getResource(
         "Models/Characters/Butcher/default-jme.xml");
    

    public Character(){
       position = new Vector3f(0,0,2f);
       speed = new Vector3f(0,0,0);
       load();
    }
   
   public void update(float frame){
      position.addLocal(speed.mult(frame));
      theMesh.setLocalTranslation(position); // ???
   }
   
   public void load(){
      
      // May also be called during update() loop to add to scene.
        Spatial loadedSpatial = null;
        try {
            loadedSpatial = (Spatial) xmlImporter.load(modelUrl);
        } catch (Exception e) {
            //e.printStackTrace();
            throw new IllegalArgumentException(
                    "Failed to load URL: " + modelUrl, e);

        }
      /*  Node temp = new Node();
        temp.attachChild(loadedSpatial);
        theMesh = (Spatial)temp;*/
   }
   
   
   public void think(){
      
   }
   
}

got the solution !!



finally, it was because the .jar in my build path were pointing out to an inexistant folder …