Very annoying issue (Main class)

This is a very simple error, I even know what it means, but I can't fix it:



java.lang.NoClassDefFoundError: com/jme/app/MyTest
Exception in thread "main"



Every thing I run does that, except if I name it like in a tutorial:



import com.jme.app.SimpleGame;
import com.jme.scene.shape.Sphere;
import com.jme.math.Vector3f;
import com.jme.bounding.BoundingBox;
import com.jme.scene.state.TextureState;
import com.jme.image.Texture;
import com.jme.util.TextureManager;
 
/**
 * First example class shows how to create a window/application using
 * SimpleGame. This will do nothing but display a Sphere in the center.
 * For Flag Rush Tutorial Series.
 * @author mark powell
 *
 */
public class Lesson1 extends SimpleGame {
   /**
    * Main method is the entry point for this lesson. It creates a
    * SimpleGame and tells the dialog to always appear. It then
    * starts the main loop.
    * @param args
    */
   public static void main(String[] args) {
       Lesson1 app = new Lesson1();
       app.setConfigShowMode(ConfigShowMode.NeverShow);
       app.start();
   }
 
   /**
      * sets the title of the window, creates a sphere and textures it
      * with the monkey.
      * @see com.jme.app.SimpleGame#initGame()
      */
     protected void simpleInitGame() {
             display.setTitle("Simple!");
 
        Sphere s = new Sphere("Sphere", 30, 30, 25);
        s.setLocalTranslation(new Vector3f(0,0,-40));
        s.setModelBound(new BoundingBox());
        s.updateModelBound();
 
        Texture texture = TextureManager.loadTexture(
                      MyTest.class.getClassLoader().getResource(
                      "jmetest/data/images/Monkey.jpg"),
                      Texture.MinificationFilter.Trilinear,
                      Texture.MagnificationFilter.Bilinear);
        TextureState ts = display.getRenderer().createTextureState();
        ts.setEnabled(true);
        ts.setTexture(texture);
 
        s.setRenderState(ts);
 
        rootNode.attachChild(s);
     }
 
}



Now, that code would run, but if I tried to rename it like this:



import com.jme.app.SimpleGame;
import com.jme.scene.shape.Sphere;
import com.jme.math.Vector3f;
import com.jme.bounding.BoundingBox;
import com.jme.scene.state.TextureState;
import com.jme.image.Texture;
import com.jme.util.TextureManager;
 
/**
 * First example class shows how to create a window/application using
 * SimpleGame. This will do nothing but display a Sphere in the center.
 * For Flag Rush Tutorial Series.
 * @author mark powell
 *
 */
public class MyTest extends SimpleGame {
   /**
    * Main method is the entry point for this lesson. It creates a
    * SimpleGame and tells the dialog to always appear. It then
    * starts the main loop.
    * @param args
    */
   public static void main(String[] args) {
       MyTest app = new MyTest();
       app.setConfigShowMode(ConfigShowMode.NeverShow);
       app.start();
   }
 
   /**
      * sets the title of the window, creates a sphere and textures it
      * with the monkey.
      * @see com.jme.app.SimpleGame#initGame()
      */
     protected void simpleInitGame() {
             display.setTitle("Simple!");
 
        Sphere s = new Sphere("Sphere", 30, 30, 25);
        s.setLocalTranslation(new Vector3f(0,0,-40));
        s.setModelBound(new BoundingBox());
        s.updateModelBound();
 
        Texture texture = TextureManager.loadTexture(
                      MyTest.class.getClassLoader().getResource(
                      "jmetest/data/images/Monkey.jpg"),
                      Texture.MinificationFilter.Trilinear,
                      Texture.MagnificationFilter.Bilinear);
        TextureState ts = display.getRenderer().createTextureState();
        ts.setEnabled(true);
        ts.setTexture(texture);
 
        s.setRenderState(ts);
 
        rootNode.attachChild(s);
     }
 
}



It doesn't work. I get a pop up saying:


Could not find the main class. The program will exit.



The title of the pop up is "Java Virtual Machine Launcher."

Also, this is weird if I do this:



import com.jme.app.SimpleGame;
import com.jme.scene.shape.Sphere;
import com.jme.math.Vector3f;
import com.jme.bounding.BoundingBox;
import com.jme.scene.state.TextureState;
import com.jme.image.Texture;
import com.jme.util.TextureManager;
 
/**
 * First example class shows how to create a window/application using
 * SimpleGame. This will do nothing but display a Sphere in the center.
 * For Flag Rush Tutorial Series.
 * @author mark powell
 *
 */
public class Lesson1 extends SimpleGame {
   /**
    * Main method is the entry point for this lesson. It creates a
    * SimpleGame and tells the dialog to always appear. It then
    * starts the main loop.
    * @param args
    */
   public static void main(String[] args) {
       Lesson1 app = new Lesson1();
       app.setConfigShowMode(ConfigShowMode.NeverShow);
       app.start();
   }
 
   /**
      * sets the title of the window, creates a sphere and textures it
      * with the monkey.
      * @see com.jme.app.SimpleGame#initGame()
      */
     protected void simpleInitGame() {
   
     }
 
}




If I remove all the coding, of the texture and adding the sphere into my code, it's still there, which means I don't even think the JVM is even reading this class at all, as if it was reading it from somewhere else completely. Plus the name of the application still says "Tutorial 1." I'm not on tutorial 1, that's just an example of my problem. I hope I explained my issue well.




Thank you for your reply!





I am using an IDE (Eclipse), and Build automatically is checked. So I'm still not sure what the problem is. I've always thought Eclipse compiles automatically any ways, so maybe it's not. But I'm sure the Build Automatically feature is checked.

You need to compile your java files into classes after making changes. If you are using an IDE like Eclipse, make sure 'Build Automatically' is turned on under the Project menu.

You can try cleaning your project. This will remove all class files and rebuild them. Other than that, all I can say is to make sure you're running what you think you are. Good luck!

nymon said:

You can try cleaning your project. This will remove all class files and rebuild them. Other than that, all I can say is to make sure you're running what you think you are. Good luck!



Alright, trying that right now. I'll post back here if I get this thing working.




Ok this is really getting stupid. Alright how can I explain this, it's running future classes, even after I cleaned it up with the "Clean..." thing.


Say for example in my other class I had the title of the application "Simple!," but in this class I would have it as "Simple2!," it would run the other older version of the class. The title would print out "Simple!" instead of "Simple2"


Ugh, I can type:


;AKJFK;LADJFA;DSKLGH;AKITHJAER;KLFJA;KLFJADS;FKLJADS;GLJADFGK;LADFHHHHHHHKJLHDS;LFJADSK;LFJADK;GJHLTIUERH;KGFKLFSJDGHKLSFGH




As a code and save it, than it runs... It still shows the example I was doing with the sphere, and texture, ect.

If the class you are working on doesn't have a main method, Eclipse will run the last class in the same package that you ran.

Alric said:

If the class you are working on doesn't have a main method, Eclipse will run the last class in the same package that you ran.

Try a right-click in the file you are working on and go to 'Run As...' and select 'Java Application".

Thanks guys for all the help, I figured it out.





Also, while I'm at it I was just trying to find a quick sample code to show you guys my problem, I seen that the code tags in this tutorial are slightly messed up:



http://www.jmonkeyengine.com/wiki/doku.php?id=jme2-moving_away_from_simplegame_with_your_own_app



Just wanted to point that out, it's extremely hard to read, could help new people.

I see that…



Unfortunately I don't have any edit links (but only on that page :?) and can't do anything about it…

basixs said:

I see that...

Unfortunately I don't have any edit links (but only on that page :?) and can't do anything about it...

Scroll to the very bottom of the page and you can edit it.

lol, oh you mean those links??  :roll:



(Fixed, thanx Z0mbiedevice)

I wish someone would update those tutorials though, I would've already learned the entire series, but I've spent most of my time fixing the code. Even when I finish all the "JME2" tutorials, which the first 2 are correct, the second 2 are completely wrong, it still doesn't come out right.





package jmetest.flagrushtut;

import javax.swing.ImageIcon;

import com.jme.scene.state.LightState;
import com.jme.scene.state.TextureState;
import com.jme.app.BaseGame;
import com.jme.bounding.BoundingBox;
import com.jme.image.Texture;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;
import com.jme.light.DirectionalLight;
import com.jme.math.FastMath;
import com.jme.math.Quaternion;
import com.jme.math.Vector3f;
import com.jme.renderer.Camera;
import com.jme.renderer.ColorRGBA;
import com.jme.renderer.Renderer;
import com.jme.scene.Node;
import com.jme.scene.SharedMesh;
import com.jme.scene.Skybox;
import com.jme.scene.shape.Box;
import com.jme.scene.shape.Cylinder;
import com.jme.scene.state.BlendState;
import com.jme.scene.state.ZBufferState;
import com.jme.system.DisplaySystem;
import com.jme.system.JmeException;
import com.jme.util.TextureManager;
import com.jme.util.Timer;
import com.jmex.terrain.TerrainBlock;
import com.jmex.terrain.util.MidPointHeightMap;
import com.jmex.terrain.util.ProceduralTextureGenerator;



//Removed imports for size
 
/**
 * Tutorial 4 Builds the environment (surrounding structure and sky).
 * framework for Flag Rush. For Flag Rush Tutorial Series.
 *
 * @author Mark Powell
 */
public class Tryit extends BaseGame {
   // the terrain we will drive over.
    private TerrainBlock tb;
    // The texture that makes up the "force field", we will keep a reference to it
    // here to allow us to animate it.
    private Texture t;
    //Sky box (we update it each frame)
   private Skybox skybox;
 
    //the timer
   protected Timer timer;
 
   // Our camera object for viewing the scene
   private Camera cam;
 
   // the root node of the scene graph
   private Node scene;
 
   // display attributes for the window. We will keep these values
   // to allow the user to change them
   private int width, height, depth, freq;
   private boolean fullscreen;
 
   /**
    * Main entry point of the application
    */
   public static void main(String[] args) {
      Lesson4 app = new Lesson4();
      // We will load our own "fantastic" Flag Rush logo. Yes, I'm an artist.
      app.setConfigShowMode(ConfigShowMode.AlwaysShow, Tryit.class
            .getClassLoader().getResource(
                  "jmetest/data/images/FlagRush.png"));
      app.start();
   }
 
   /**
    * During an update we look for the escape button and update the timer
    * to get the framerate. Things are now starting to happen, so we will
     * update
    *
    * @see com.jme.app.SimpleGame#update()
    */
   protected void update(float interpolation) {
      // update the time to get the framerate
      timer.update();
      interpolation = timer.getTimePerFrame();
 
        //We will use the interpolation value to keep the speed
        //of the forcefield consistent between computers.
        //we update the Y have of the texture matrix to give
        //the appearance the forcefield is moving.
        t.getTranslation().y += 0.3f * interpolation;
        //if the translation is over 1, it's wrapped, so go ahead
        //and check for this (to keep the vector's y value from getting
        //too large.)
        if(t.getTranslation().y > 1) {
            t.getTranslation().y = 0;
        }
 
        //we want to keep the skybox around our eyes, so move it with
        //the camera
      skybox.setLocalTranslation(cam.getLocation());
 
 
        // if escape was pressed, we exit
      if (KeyBindingManager.getKeyBindingManager().isValidCommand("exit")) {
         finished = true;
      }
 
        //Because we are changing the scene (moving the skybox) we need to update
        //the graph.
        scene.updateGeometricState(interpolation, true);
   }
 
   /**
    * draws the scene graph
    *
    * @see com.jme.app.SimpleGame#render()
    */
   protected void render(float interpolation) {
      // Clear the screen
      display.getRenderer().clearBuffers();
      display.getRenderer().draw(scene);
   }
 
   /**
    * initializes the display and camera.
    *
    * @see com.jme.app.SimpleGame#initSystem()
    */
   protected void initSystem() {
      // store the properties information
      width = this.settings.getWidth();
      height = this.settings.getHeight();
      depth = this.settings.getDepth();
      freq = this.settings.getFrequency();
      fullscreen = this.settings.isFullscreen();
 
      try {
         display = DisplaySystem.getDisplaySystem(settings.getRenderer());
         display.createWindow(width, height, depth, freq, fullscreen);
 
         cam = display.getRenderer().createCamera(width, height);
      } catch (JmeException e) {
         e.printStackTrace();
         System.exit(1);
      }
 
      // set the background to black
      display.getRenderer().setBackgroundColor(ColorRGBA.black);
 
      // initialize the camera
      cam.setFrustumPerspective(45.0f, (float) width / (float) height, 1,
            5000);
      Vector3f loc = new Vector3f(250.0f, 100.0f, 250.0f);
      Vector3f left = new Vector3f(-0.5f, 0.0f, 0.5f);
      Vector3f up = new Vector3f(0.0f, 1.0f, 0.0f);
      Vector3f dir = new Vector3f(-0.5f, 0.0f, -0.5f);
      // Move our camera to a correct place and orientation.
      cam.setFrame(loc, left, up, dir);
      /** Signal that we've changed our camera's location/frustum. */
      cam.update();
      
      /** Get a high resolution timer for FPS updates. */
      timer = Timer.getTimer();
 
      
      
      display.getRenderer().setCamera(cam);
 
      KeyBindingManager.getKeyBindingManager().set("exit",
            KeyInput.KEY_ESCAPE);

   }
 
   /**
    * initializes the scene
    *
    * @see com.jme.app.SimpleGame#initGame()
    */
   protected void initGame() {
        display.setTitle("Flag Rush");
 
      scene = new Node("Scene graph node");
      /** Create a ZBuffer to display pixels closest to the camera above farther ones.  */
       ZBufferState buf = display.getRenderer().createZBufferState();
       buf.setEnabled(true);
       buf.setFunction(ZBufferState.TestFunction.LessThanOrEqualTo);
       scene.setRenderState(buf);
      //Add terrain to the scene
        buildTerrain();
      //Light the world
       buildLighting();
       //add the force field fence
       buildEnvironment();
       //Add the skybox
       buildSkyBox();
 
      // update the scene graph for rendering
      scene.updateGeometricState(0.0f, true);
      scene.updateRenderState();
   }
 
    /**
     * buildEnvironment will create a fence. This is done by hand
     * to show how to create geometry and shared this geometry.
     * Normally, you wouldn't build your models by hand as it is
     * too much of a trial and error process.
     */
   private void buildEnvironment() {
        //This is the main node of our fence
        Node forceFieldFence = new Node("fence");
 
        //This cylinder will act as the four main posts at each corner
        Cylinder postGeometry = new Cylinder("post", 10, 10, 1, 10);
        Quaternion q = new Quaternion();
        //rotate the cylinder to be vertical
        q.fromAngleAxis(FastMath.PI/2, new Vector3f(1,0,0));
        postGeometry.setLocalRotation(q);
        postGeometry.setModelBound(new BoundingBox());
        postGeometry.updateModelBound();
 
        //We will share the post 4 times (one for each post)
        //It is *not* a good idea to add the original geometry
        //as the sharedmeshes will alter its local values.
        //We then translate the posts into position.
        //Magic numbers are bad, but help illustrate the point.:)
        SharedMesh post1 = new SharedMesh("post1", postGeometry);
        post1.setLocalTranslation(new Vector3f(0,0.5f,0));
        SharedMesh post2 = new SharedMesh("post2", postGeometry);
        post2.setLocalTranslation(new Vector3f(32,0.5f,0));
        SharedMesh post3 = new SharedMesh("post3", postGeometry);
        post3.setLocalTranslation(new Vector3f(0,0.5f,32));
        SharedMesh post4 = new SharedMesh("post4", postGeometry);
        post4.setLocalTranslation(new Vector3f(32,0.5f,32));
 
        //This cylinder will be the horizontal struts that hold
        //the field in place.
        Cylinder strutGeometry = new Cylinder("strut", 10,10, 0.125f, 32);
        strutGeometry.setModelBound(new BoundingBox());
        strutGeometry.updateModelBound();
 
        //again, we'll share this mesh.
        //Some we need to rotate to connect various posts.
        SharedMesh strut1 = new SharedMesh("strut1", strutGeometry);
        Quaternion rotate90 = new Quaternion();
        rotate90.fromAngleAxis(FastMath.PI/2, new Vector3f(0,1,0));
        strut1.setLocalRotation(rotate90);
        strut1.setLocalTranslation(new Vector3f(16,3f,0));
        SharedMesh strut2 = new SharedMesh("strut2", strutGeometry);
        strut2.setLocalTranslation(new Vector3f(0,3f,16));
        SharedMesh strut3 = new SharedMesh("strut3", strutGeometry);
        strut3.setLocalTranslation(new Vector3f(32,3f,16));
        SharedMesh strut4 = new SharedMesh("strut4", strutGeometry);
        strut4.setLocalRotation(rotate90);
        strut4.setLocalTranslation(new Vector3f(16,3f,32));
 
        //Create the actual forcefield
        //The first box handles the X-axis, the second handles the z-axis.
        //We don't rotate the box as a demonstration on how boxes can be
        //created differently.
        Box forceFieldX = new Box("forceFieldX", new Vector3f(-16, -3f, -0.1f), new Vector3f(16f, 3f, 0.1f));
        forceFieldX.setModelBound(new BoundingBox());
        forceFieldX.updateModelBound();
        //We are going to share these boxes as well
        SharedMesh forceFieldX1 = new SharedMesh("forceFieldX1",forceFieldX);
        forceFieldX1.setLocalTranslation(new Vector3f(16,0,0));
        SharedMesh forceFieldX2 = new SharedMesh("forceFieldX2",forceFieldX);
        forceFieldX2.setLocalTranslation(new Vector3f(16,0,32));
 
        //The other box for the Z axis
        Box forceFieldZ = new Box("forceFieldZ", new Vector3f(-0.1f, -3f, -16), new Vector3f(0.1f, 3f, 16));
        forceFieldZ.setModelBound(new BoundingBox());
        forceFieldZ.updateModelBound();
        //and again we will share it
        SharedMesh forceFieldZ1 = new SharedMesh("forceFieldZ1",forceFieldZ);
        forceFieldZ1.setLocalTranslation(new Vector3f(0,0,16));
        SharedMesh forceFieldZ2 = new SharedMesh("forceFieldZ2",forceFieldZ);
        forceFieldZ2.setLocalTranslation(new Vector3f(32,0,16));
 
        //add all the force fields to a single node and make this node part of
        //the transparent queue.
        Node forceFieldNode = new Node("forceFieldNode");
        forceFieldNode.setRenderQueueMode(Renderer.QUEUE_TRANSPARENT);
        forceFieldNode.attachChild(forceFieldX1);
        forceFieldNode.attachChild(forceFieldX2);
        forceFieldNode.attachChild(forceFieldZ1);
        forceFieldNode.attachChild(forceFieldZ2);
 
        //Add the alpha values for the transparent node
        BlendState as1 = display.getRenderer().createBlendState();
        as1.setBlendEnabled(true);
        as1.setSourceFunction(BlendState.SourceFunction.SourceAlpha );
        as1.setDestinationFunction(BlendState.DestinationFunction.One);
        as1.setTestEnabled(true);
        as1.setTestFunction(BlendState.TestFunction.GreaterThan);
        as1.setEnabled(true);
 
        forceFieldNode.setRenderState(as1);
 
        //load a texture for the force field elements
        TextureState ts = display.getRenderer().createTextureState();
        t = TextureManager.loadTexture(Tryit.class.getClassLoader()
                  .getResource("jmetest/data/texture/reflector.jpg"),
                  Texture.MinificationFilter.BilinearNearestMipMap,
                  Texture.MagnificationFilter.Bilinear);
 
        t.setWrap(Texture.WrapMode.Repeat);
        t.setTranslation(new Vector3f());
        ts.setTexture(t);
 
        forceFieldNode.setRenderState(ts);
 
 
        //put all the posts into a tower node
        Node towerNode = new Node("tower");
        towerNode.attachChild(post1);
        towerNode.attachChild(post2);
        towerNode.attachChild(post3);
        towerNode.attachChild(post4);
 
        //add the tower to the opaque queue (we don't want to be able to see through them)
        //and we do want to see them through the forcefield.
        towerNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
 
        //load a texture for the towers
        TextureState ts2 = display.getRenderer().createTextureState();
        Texture t2 = TextureManager.loadTexture(Lesson4.class.getClassLoader()
                  .getResource("jmetest/data/texture/post.jpg"),
                  Texture.MinificationFilter.BilinearNearestMipMap,
                  Texture.MagnificationFilter.Bilinear);
 
        ts2.setTexture(t2);
 
        towerNode.setRenderState(ts2);
 
        //put all the struts into a single node.
        Node strutNode = new Node("strutNode");
        strutNode.attachChild(strut1);
        strutNode.attachChild(strut2);
        strutNode.attachChild(strut3);
        strutNode.attachChild(strut4);
        //this too is in the opaque queue.
        strutNode.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
 
        //load a texture for the struts
        TextureState ts3 = display.getRenderer().createTextureState();
        Texture t3 = TextureManager.loadTexture(Lesson4.class.getClassLoader()
                  .getResource("jmetest/data/texture/rust.jpg"),
                  Texture.MinificationFilter.BilinearNearestMipMap,
                  Texture.MagnificationFilter.Bilinear);
 
        ts3.setTexture(t3);
 
        strutNode.setRenderState(ts3);
 
        //we will do a little 'tweaking' by hand to make it fit in the terrain a bit better.
        //first we'll scale the entire "model" by a factor of 5
        forceFieldFence.setLocalScale(5);
        //now let's move the fence to to the height of the terrain and in a little bit.
        forceFieldFence.setLocalTranslation(new Vector3f(25, tb.getHeight(25,25) + 15, 25));
 
        //Attach all the pieces to the main fence node
        forceFieldFence.attachChild(forceFieldNode);
        forceFieldFence.attachChild(towerNode);
        forceFieldFence.attachChild(strutNode);
 
        scene.attachChild(forceFieldFence);
   }
 
   /**
    * creates a light for the terrain.
    */
   private void buildLighting() {
      /** Set up a basic, default light. */
       DirectionalLight light = new DirectionalLight();
       light.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
       light.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
       light.setDirection(new Vector3f(1,-1,0));
       light.setEnabled(true);
 
         /** Attach the light to a lightState and the lightState to rootNode. */
       LightState lightState = display.getRenderer().createLightState();
       lightState.setEnabled(true);
       lightState.attach(light);
       scene.setRenderState(lightState);
   }
 
   /**
    * build the height map and terrain block.
    */
   private void buildTerrain() {
 
 
        MidPointHeightMap heightMap = new MidPointHeightMap(64, 1f);
        // Scale the data
        Vector3f terrainScale = new Vector3f(4, 0.0575f, 4);
        // create a terrainblock
         tb = new TerrainBlock("Terrain", heightMap.getSize(), terrainScale,
                heightMap.getHeightMap(), new Vector3f(0, 0, 0));
 
        tb.setModelBound(new BoundingBox());
        tb.updateModelBound();
 
        // generate a terrain texture with 2 textures
        ProceduralTextureGenerator pt = new ProceduralTextureGenerator(
                heightMap);
        pt.addTexture(new ImageIcon(Tryit.class.getClassLoader()
                .getResource("jmetest/data/texture/grassb.png")), -128, 0, 128);
        pt.addTexture(new ImageIcon(Tryit.class.getClassLoader()
                .getResource("jmetest/data/texture/dirt.jpg")), 0, 128, 255);
        pt.addTexture(new ImageIcon(Tryit.class.getClassLoader()
                .getResource("jmetest/data/texture/highest.jpg")), 128, 255,
                384);
        pt.createTexture(32);
 
        // assign the texture to the terrain
        TextureState ts = display.getRenderer().createTextureState();
        Texture t1 = TextureManager.loadTexture(pt.getImageIcon().getImage(),
                Texture.MinificationFilter.Trilinear, Texture.MagnificationFilter.Bilinear, true);
        ts.setTexture(t1, 0);
 
        tb.setRenderState(ts);
        tb.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
        scene.attachChild(tb);
 
 
   }
 
    /**
     * buildSkyBox creates a new skybox object with all the proper textures. The
     * textures used are the standard skybox textures from all the tests.
     *
     */
   private void buildSkyBox() {
        skybox = new Skybox("skybox", 10, 10, 10);
 
        Texture north = TextureManager.loadTexture(
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/north.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
        Texture south = TextureManager.loadTexture(
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/south.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
        Texture east = TextureManager.loadTexture(
 
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/east.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
        Texture west = TextureManager.loadTexture(
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/west.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
        Texture up = TextureManager.loadTexture(
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/top.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
        Texture down = TextureManager.loadTexture(
            Tryit.class.getClassLoader().getResource(
            "jmetest/data/texture/bottom.jpg"),
            Texture.MinificationFilter.BilinearNearestMipMap,
            Texture.MagnificationFilter.Bilinear);
 
        skybox.setTexture(Skybox.Face.North, north);
        skybox.setTexture(Skybox.Face.West, west);
        skybox.setTexture(Skybox.Face.South, south);
        skybox.setTexture(Skybox.Face.East, east);
        skybox.setTexture(Skybox.Face.Up, up);
        skybox.setTexture(Skybox.Face.Down, down);
        skybox.preloadTextures();
        scene.attachChild(skybox);
   }
 
   /**
    * will be called if the resolution changes
    *
    * @see com.jme.app.SimpleGame#reinit()
    */
 
   protected void reinit() {
      display.recreateWindow(width, height, depth, freq, fullscreen);
   }
 
   /**
    * clean up the textures.
    *
    * @see com.jme.app.SimpleGame#cleanup()
    */
   protected void cleanup() {
 
   }
}



Is what I converted it too after 45 minutes of correcting every thing. And I still have more to do, as it came out like this:



So I still have some work to do! I would help in the wiki if I could.
Invalid said:

So I still have some work to do! I would help in the wiki if I could.

Please do!