Can't run JME

So I started to work with it in NetBeans 6.7 I followed this tutorial to set it up

and when I run it with this code:

package test;

import com.jme.math.Vector3f;
import com.jme.scene.shape.Box;

public class TestSphere extends SimpleGame {
    public static void main(String[] args) {   
        TestSphere app = new TestSphere();
    protected void simpleInitGame() {
        Box b = new Box("My box",new Vector3f(0,0,0),new Vector3f(1,1,1));// Make a box
        rootNode.attachChild(b);// Put it in the scene graph

I always get this error:

30-Jul-2009 8:41:29 AM start
INFO: Application started.
30-Jul-2009 8:41:29 AM com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
30-Jul-2009 8:41:29 AM com.jme.system.PropertiesGameSettings load
WARNING: Could not load properties. Creating a new one.
30-Jul-2009 8:41:30 AM class test.TestSphere start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(
        at java.lang.Runtime.loadLibrary0(
        at java.lang.System.loadLibrary(
        at org.lwjgl.Sys$
        at Method)
        at org.lwjgl.Sys.doLoadLibrary(
        at org.lwjgl.Sys.loadLibrary(
        at org.lwjgl.Sys.<clinit>(
        at org.lwjgl.opengl.Display.<clinit>(
        at com.jme.system.lwjgl.LWJGLPropertiesDialog$
        at test.TestSphere.main(
30-Jul-2009 8:41:30 AM cleanup
INFO: Cleaning up resources.
30-Jul-2009 8:41:30 AM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
30-Jul-2009 8:41:30 AM start
INFO: Application ending.

If someone can help me set it up I would be greatful. Thanks

i don't use netbeans, but in eclipse you need to set a native library path for the lwjgl.jar, which tells it  where the lwjgl.dll can be found.

Having a look on the netbeans tutorial, i guess you should recheck this step:

Next we add all native dynamic libraries to the Java Library Path:

     In the Project window, right-click your project and choose Properties from the context-menu.
           Go to the Run category of the Properties window.
           VM Options: Enter into the VM Options field where to find the native libraries.


     Close the Properties window.
     Your project is now set up to run an applications built with the jME framework.

Hha I did and I got it working I saw the graw box.

Now I have a new problem when I was working with a test file on of the imports in it, NetBeans claims I do not have it

import com.jme.scene.state.AlphaState;

Netbeans is right, you dont have it - that was from JME1 :slight_smile:

See the wiki for how to update JME1 code to JME2

AlphaState is a class belonging to jme1.

… it's suggestet to work with jme2 nowadays… but that just by the way.

what causes your error is a missing import of the class alphastate or you try to use old jme1 code with your netbeans project which is setup for jm2. so it can't find a class alphastate… its not there of course.