Why are packages not available

Hello,

I am a beginner in JMonkeyEngine and I started today to learn more about this engine.



I began to make the tutorials on this page. And I have a problem.

The first Tutorial requires to import com.jme3.app.SimpleApplication.

JME says that this package doesnt exists.<br /> <br /> Where is the problem? With the installation of JME all packages have to<br /> be installed with.<br /> <br /> Thanks for help.<br /> <br /> Sorry if I make mistakes in my language. English isnt my mother tongue.

Oh I found the problem. I had to make a JME Project. I made first a AssetPack Project.

But I surely will have more questions today.

Now I have a new question.



My Code:

[java]



package Uebung2;



import com.jme3.app.SimpleApplication;

import com.jme3.font.BitmapText;

import com.jme3.light.DirectionalLight;

import com.jme3.material.Material;

import com.jme3.math.Quaternion;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.Spatial;

import com.jme3.scene.shape.Box;



public class Uebung2 extends SimpleApplication{



public static void main(String[] args){

Uebung2 uebung2 = new Uebung2();

uebung2.start();

}



@Override

public void simpleInitApp(){



Spatial teapot = assetManager.loadModel("Models/Teapot/Teapot.obj");

Material mat_default = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");

teapot.setMaterial(mat_default);

rootNode.attachChild(teapot);



Box box = new Box(Vector3f.ZERO, 2.5f,2.5f,1.0f);

Spatial wall = new Geometry("Box", box);

Material mat_brick = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");

mat_brick.setTexture("ColorMap", assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg"));

wall.setMaterial(mat_brick);

rootNode.attachChild(wall);





DirectionalLight light = new DirectionalLight();

light.setDirection(new Vector3f(-0.1f,-0.7f, -1.0f));

rootNode.addLight(light);



}



}[/java]



The program doesnt show mistakes in the Engine but if I start it, it closes itself.<br /> <br /> I think the reason is, because I havent the data Unshaded.j3md in my MatDefs Folder.

Brickwall.jpg is also missing.



Where can I download this two files to start the programm.

Make sure you see the “Projects” tab on the left side in the IDE. There should be a node called “Libraries” there.

Make sure it lists “jme3 - jME3-core.jar” and “jme3-test-data - jME-testdata.jar”.



The “Common/MatDefs/Misc/…” are located inside the core JAR-file. The other resources you want to use are in the test-data.jar.



Hope that helps.



Cheers,

Johan Maasing

You should read the documentation. Really, this would have answered all your questions. https://wiki.jmonkeyengine.org/legacy/doku.php/jme3#tutorials_for_beginners