Basic classes not found (SimpleApplication, Material, etc)

If I create a new project I can immediatley not run it because the basic classes can’t be found. I just did a fresh install of the SDK but that didn’t help.

This is the output from the default main.java created for each new project:

ant -f “D:\DATA\Libraries\Programming\JM Projects\Bookwork” jar
init:
Deleting: D:\DATA\Libraries\Programming\JM Projects\Bookwork\build\built-jar.properties
deps-jar:
Updating property file: D:\DATA\Libraries\Programming\JM Projects\Bookwork\build\built-jar.properties
Compiling 1 source file to D:\DATA\Libraries\Programming\JM Projects\Bookwork\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.5
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:3: error: cannot find symbol
import com.jme3.app.SimpleApplication;
symbol: class SimpleApplication
location: package com.jme3.app
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:4: error: package com.jme3.material does not exist
import com.jme3.material.Material;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:5: error: package com.jme3.math does not exist
import com.jme3.math.ColorRGBA;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:6: error: package com.jme3.math does not exist
import com.jme3.math.Vector3f;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:7: error: package com.jme3.renderer does not exist
import com.jme3.renderer.RenderManager;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:8: error: package com.jme3.scene does not exist
import com.jme3.scene.Geometry;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:9: error: package com.jme3.scene.shape does not exist
import com.jme3.scene.shape.Box;
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:16: error: cannot find symbol
public class Main extends SimpleApplication
symbol: class SimpleApplication
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:44: error: cannot find symbol
public void simpleRender(RenderManager rm)
symbol: class RenderManager
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:21: error: cannot find symbol
app.start();
symbol: method start()
location: variable app of type Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:27: error: cannot find symbol
Box b = new Box(1, 1, 1);
symbol: class Box
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:27: error: cannot find symbol
Box b = new Box(1, 1, 1);
symbol: class Box
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:28: error: cannot find symbol
Geometry geom = new Geometry(“Box”, b);
symbol: class Geometry
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:28: error: cannot find symbol
Geometry geom = new Geometry(“Box”, b);
symbol: class Geometry
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:30: error: cannot find symbol
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
symbol: class Material
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:30: error: cannot find symbol
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
symbol: class Material
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:30: error: cannot find symbol
Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);
symbol: variable assetManager
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:31: error: cannot find symbol
mat.setColor(“Color”, ColorRGBA.Blue);
symbol: variable ColorRGBA
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:34: error: cannot find symbol
rootNode.attachChild(geom);
symbol: variable rootNode
location: class Main
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:24: error: method does not override or implement a method from a supertype
@Override
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:37: error: method does not override or implement a method from a supertype
@Override
D:\DATA\Libraries\Programming\JM Projects\Bookwork\src\mygame\Main.java:43: error: method does not override or implement a method from a supertype
@Override
22 errors
1 warning
D:\DATA\Libraries\Programming\JM Projects\Bookwork\nbproject\build-impl.xml:914: The following error occurred while executing this line:
D:\DATA\Libraries\Programming\JM Projects\Bookwork\nbproject\build-impl.xml:305: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)

This is obviously something on my end but I have no idea why I’m missing these things. The SDK worked fine a few days ago.

Are the libraries listed in the project properties->Libraries tab?

Yes

When you look at the library itself (I think you should be able to double-click them, else via the Tools->Libraries menu), are the single jar files written in black or in red with an exclamation mark? Oh, and I guess you already tried a simple clean&build?

I tried a clean and build, the output is largely the same (can’t build because of missing things).
If I expand the libraries node in the project window, I can find com.jme3.app.SimpleApplication (and all other things) and they do not show any errors/exclamation marks, on neither classes or jars.
I also checked the actual locations on my drive they should be and they are there.

This problem persists for other projects as well, by the way.

EDIT rewrote a sentence for clarity

Very strange, did you try deleting the settings folder altogether? Maybe the SDK can’t write it for some reason (it contains a created build import file with the library references).

1 Like

Sorry for the late reply, I was at work.
Deleting the settings folder ( I assumed it was the entire folder in %AppData%) fixed it.
Thanks a lot for the fast replies!