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(
   at characters.Character.<init>(
   at dungeon.InsideMap.simpleInitGame(
   at dungeon.InsideMap.initGame(
   at dungeon.InsideMap.main(

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,

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 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(

    public Character(){
       position = new Vector3f(0,0,2f);
       speed = new Vector3f(0,0,0);
   public void update(float 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) {
            throw new IllegalArgumentException(
                    "Failed to load URL: " + modelUrl, e);

      /*  Node temp = new Node();
        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 …