jME2 installing problems

Hi,



I am trying to install jme2 for few hours and still cant get it work.



I am following this manual http://www.jmonkeyengine.com/wiki/doku.php?id=downloading_and_installing_jme_2.x

, but i cant really get it. It is so complicated, with lot of mistakes and totaly outdated.



I just dont undestand that i cant simply download jars and than create a library from them, which i would use.



So can anyone create simple set of instructions to follow please?


all tutorials on jme 2.0:

http://www.jmonkeyengine.com/wiki/doku.php?id=the_tutorials_-_jme_2



download and use latest stable jars:

http://www.jmonkeyengine.com/wiki/doku.php?id=downloading_and_installing_jme_2_from_googlecode

If you are using Eclipse and jME 2.0, here's the simple steps.

  1. Download jME_2.0_Complete_(r4093).zip
  2. Extract it to a directory of your choice
  3. Start Eclipse
  4. Create a Java project
  5. Right click on your project
  6. Click Build Path + Configure Build Path…
  7. Click Libraries tab
  8. Click Add External JARs… button
  9. Browse to where you extract the ZIP file
  10. Choose jME_2.0.jar
  11. Click Open
  12. Click the + button to the left of the jME_2.0.jar icon
  13. Select Native library location: (None)
  14. Click Edit… button
  15. Click External Folder… button
  16. Browse to where you extract the ZIP file
  17. Expand lib folder
  18. Click on natives folder
  19. Click OK three times

    And you are done. :slight_smile:



    Roslan






Thanks for your help

Hi,

I'm new here and tryed to install jME.

roslamir said:

If you are using Eclipse and jME 2.0, here's the simple steps.
1. Download jME_2.0_Complete_(r4093).zip
2. Extract it to a directory of your choice
3. Start Eclipse
4. Create a Java project
5. Right click on your project
6. Click Build Path + Configure Build Path...
7. Click Libraries tab
8. Click Add External JARs... button
9. Browse to where you extract the ZIP file
10. Choose jME_2.0.jar
11. Click Open
12. Click the + button to the left of the jME_2.0.jar icon
13. Select Native library location: (None)
14. Click Edit... button
15. Click External Folder... button
16. Browse to where you extract the ZIP file
17. Expand lib folder
18. Click on natives folder
19. Click OK three times
And you are done. :)

Roslan


I've followed those instructions but for some reason, i can't instanciate some Classes.
fakeTex = new Texture(); Eclipse says "Can not instantiate the type Texture"
or
tRenderer.setupTexture(fakeTex); "The method setupTexture(Texture2D) in the type TextureRenderer is not applicable for the arguments (Texture)"

Those Codesnippets are copied out of the Tutorial http://www.jmonkeyengine.com/wiki/doku.php?id=texturerenderer

So i think the copied code is correct.  Does anybody have an idea how to fix that?

Here is my Code:

package test;

import com.jme.app.SimpleGame;
import com.jme.image.Texture;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.renderer.TextureRenderer;
import com.jme.scene.shape.Quad;
import com.jme.scene.shape.Sphere;
import com.jme.scene.state.TextureState;
import com.jme.system.DisplaySystem;
import com.jme.system.JmeException;

public class Jmetest extends SimpleGame
{   
   TextureRenderer tRenderer;
   Sphere sphere;
   Texture fakeTex;
   Quad q;
   
   public Jmetest()
   {
      try {
            DisplaySystem display = DisplaySystem.getDisplaySystem("LWJGL");
            display.createWindow(640,480,32,60,true);
          }
          catch (JmeException e)
          {
            e.printStackTrace();
            System.exit(1);
          }
   }
   protected void drawTextureStuff()
   {
        tRenderer.render(sphere, fakeTex);
   }
   
   protected void initializeStuff()
   {
      tRenderer = display.createTextureRenderer(512, 512, TextureRenderer.RENDER_TEXTURE_2D);
   
      sphere = new Sphere("Sphere", 25, 25, 5);
   
      q = new Quad("Quad", 15, 13f);
      rootNode.attachChild(q);
   
      tRenderer.setBackgroundColor(new ColorRGBA(0f, 0f, 0f, 1f));
      fakeTex = new Texture();
      tRenderer.setupTexture(fakeTex);
      TextureState screen = display.getRenderer().createTextureState();
      screen.setTexture(fakeTex);
   
      tRenderer.getCamera().setLocation(new Vector3f(-10, 0, 15f));
      tRenderer.updateCamera();
      q.setRenderState(screen);
   }
   public static void main(String[] args)
   {
      Jmetest app = new Jmetest();
      app.setConfigShowMode(ConfigShowMode.AlwaysShow);
       app.start();
   }
   @Override
   protected void simpleInitGame()
   {
      // TODO Auto-generated method stub
      
   }

}



Edregol

Guess you are not that familiar with Java.



Texture is an abstract class, so you can’t instantiate it. You need to instantiate a concrete subclass of texture, like Texture2D.



Look up the JavaDoc for jME to find out what are the abstract classes and the concrete classes.



Roslan


The code I used was copy out of the Tutorial I mentioned in my previouse post. So I supposed the code to be correct.

I followed that instructions, but when i unzip the file, there was not any folder named natives (to link with jme.jar). What can i do now?

Look again a little deeper…

Just downloaded jme2.0.1 stable distribution - and there it is -



jME2_0_1-StableDistribution.zipjME2_0_1-StableDistributionjME2_0_1-StableDistributionliblwjglnativewindows

Hi everyone,

I've got problem with getting Jme into Eclipse



//


Error

Feb 15, 2010 4:32:39 PM com.jme.app.BaseGame start
INFO: Application started.
Feb 15, 2010 4:32:39 PM com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
Feb 15, 2010 4:32:39 PM com.jme.system.PropertiesGameSettings load
INFO: Read properties
Feb 15, 2010 4:32:39 PM com.jme.app.BaseSimpleGame initSystem
INFO: jME version 2.0 Stable (r4093)
Feb 15, 2010 4:32:39 PM com.jme.input.joystick.DummyJoystickInput <init>
INFO: Joystick support is disabled
Feb 15, 2010 4:32:40 PM class firstjme start()
SEVERE: Exception in game loop
java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
at com.jme.system.lwjgl.LWJGLSystemProvider.getDisplaySystem(LWJGLSystemProvider.java:54)
at com.jme.system.DisplaySystem.getDisplaySystem(DisplaySystem.java:283)
at com.jme.system.DisplaySystem.getDisplaySystem(DisplaySystem.java:184)
at com.jme.app.BaseSimpleGame.initSystem(BaseSimpleGame.java:373)
at com.jme.app.BaseGame.start(BaseGame.java:70)
at firstjme.main(firstjme.java:12)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 6 more
Feb 15, 2010 4:32:40 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
at com.jme.system.lwjgl.LWJGLSystemProvider.getDisplaySystem(LWJGLSystemProvider.java:54)
at com.jme.system.DisplaySystem.getDisplaySystem(DisplaySystem.java:283)
at com.jme.util.TextureManager.doTextureCleanup(TextureManager.java:838)
at com.jme.app.BaseSimpleGame.cleanup(BaseSimpleGame.java:599)
at com.jme.app.BaseGame.start(BaseGame.java:102)
at firstjme.main(firstjme.java:12)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 6 more

//
Error




I use Linux Mint (Ubuntu 9.10)
Eclipse 3.5 Galileo
Java SDK ?
oem@oem-laptop ~ $ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) Client VM (build 14.1-b02, mixed mode, sharing)

I downloaded jme from http://jmonkeyengine.googlecode.com/files/jME2_0_1-StableDistribution.zip
then followed Roslan's tutorial (above tutorial)
I got to step 18, but there wasnt any natives folder
then I saw this:
Look again a little deeper...
Just downloaded jme2.0.1 stable distribution - and there it is -

jME2_0_1-StableDistribution.zipjME2_0_1-StableDistributionjME2_0_1-StableDistributionliblwjglnativewindows
so I changed it to
/media/6476c8a3-4c80-4a13-85dd-f57f30adc1ba/Install/XP/java program/JME 2.01/lib/lwjgl/native/linux

and then I clicked OK 3 times



here is the source code I am trying, eclipse doesnt find any error, but when I run the code I got the above error

import com.jme.app.SimpleGame;
import com.jme.math.FastMath;
import com.jme.math.Vector3f;
import com.jme.scene.shape.Box;

public class firstjme extends SimpleGame {

public static void main(String[] args) {

firstjme game = new firstjme();
game.setConfigShowMode(ConfigShowMode.ShowIfNoConfig);
game.start();
System.out.print("Hello your mother !!!");
}

@Override
protected void simpleInitGame() {
Box box = new Box("my box", Vector3f.ZERO, 4, 4, 4);
box.getLocalTranslation().set(0, 0, -10);
box.getLocalRotation().fromAngles(FastMath.QUARTER_PI, 0.5f, 0);
rootNode.attachChild(box);
}

}

see the video tutorials:

http://www.jmonkeyengine.com/wiki/doku.php?id=video_tutorial_-_setting_up_eclipse_to_build_jme_2



it can't get any easier :slight_smile:

uhm,

I tried those videos some months ago. the link with the trunk at the end didnt work at that time and i stucked

then somehow i managed to installed it too.



but the whole thing took a lot of time to download from svn(at least for me)



I prefer download things from the google source or google code and install it like roslan's tutor. it is faster and somehow easier (i think)

but it is a bit outdated,which is a pity.

I made another tutor, but i dont know if anyone will need it ^^ (written for idiots like me)

and I think Roslan should be the one who update it, cause he is the original creator of that tutorial

some guy like me shouldnt play in front of masters ^^