Using the jME

ok, i downloaded a jME build, but i cant see how to use the stuff from the .jar's

had a look on a few examples, they linked to stuff like com.java.[…].Box or such, but of course my compiler can't find it. i only got stuff like jME_2.0.jar and such…

is there an easier solution than downloading several programs, getting them to run on my computer and struggle around the internet for another 3 hours to build the jME?

Hola EvilTwin!



…you know that stuff like com.jme…Box is packaged in stuff like jme_2.0.jar!?!  :smiley:



What did you download?  I assume you used that link:



http://code.google.com/p/jmonkeyengine/downloads/list



JME2.0_complete.zip or JME2.0_distribution.zip?



In "complete" seems to be all you need. With run_jME.bat a starter for the demos and

in jME_2.0.jar the engine itselfs with sourcecode and the nativelibs in lib. So in order to

see whats going on you can rename the jme20.jar to a zip and unpack it.



Nevertheless if you really want to work with the sourcecodee you should use that instructions:

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



This is really the best instructions. Just take the time to go thorugh very point and it works!

hehe, thanks so far  :smiley:

but now i got another problem:

compiler warnings…

they're attached as image cause the text was non-highlightable…



im using BlueJ and this code example:

import com.jme.app.SimpleGame;
import com.jme.scene.shape.Box;
import com.jme.math.Vector3f;
public class Example1 extends SimpleGame{
public static void main(String[] args) {
Example1 app = new Example1();
app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
app.start();
}
protected void simpleInitGame(){
Box b1;
Vector3f v1 = new Vector3f(1,1,1);
Vector3f v2 = new Vector3f(5,5,15);
b1 = new Box("box", v1, v2);
rootNode.attachChild(b1);
}
}

But the sample is running!? The warning shouldn't prevent it…it just says that a package

that is somewhere inside used is a sun-only libraryand that you might get problems using something like openjdk or so…

Well a warning is a warning and not an error and as they are deprecation warnings, can practically be ignored for now, but you will need to investigate further at a later date :slight_smile:

It looks to me that you are building for and targetting java1.6 which I think deprecated most of the methods/classes you mention (well the sun,* ones).  Its nothing serious yet, but might be when java1.7 arrives (but I think we'll have a lot of other problems then!)


omg, now im totally lost… yeah, the application runs, bluej says:

05.07.2009 02:39:35 com.jme.app.BaseGame start
INFO: Application started.
05.07.2009 02:39:35 com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
05.07.2009 02:39:35 com.jme.system.PropertiesGameSettings load
WARNUNG: Could not load properties. Creating a new one.
05.07.2009 02:39:36 class Lesson1 start()
SCHWERWIEGEND: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
   at java.lang.Runtime.loadLibrary0(Runtime.java:823)
   at java.lang.System.loadLibrary(System.java:1030)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
   at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(LWJGLPropertiesDialog.java:682)
   at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:252)
   at com.jme.app.BaseGame.start(BaseGame.java:67)
   at __SHELL5.run(__SHELL5.java:9)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at bluej.runtime.ExecServer$3.run(ExecServer.java:819)
05.07.2009 02:39:36 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
05.07.2009 02:39:36 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
05.07.2009 02:39:36 com.jme.app.BaseGame start
INFO: Application ending.



yes, i know i should install lwjgl, but i dont know how to do it properly as it seems. i also installed Java Editor and when compiling with Javac it says the list-index of something is -1 (seems the system doesnt like that) and an error:

[00421908] Classes.TStringList.Get + $1C
[00421908] Classes.TStringList.Get + $1C
[005FFC3B] UDebugger.TDebugger.CompileEineDatei + $33F
[006002AD] UDebugger.TDebugger.CompileMake + $185
[005FFE75] UDebugger.TDebugger.Compile + $89
[00664FAC] UJava.TFJava.Compile + $8C
[00665101] UJava.TFJava.TBCompileJavaClick + $99
[0047158C] Controls.TControl.Click + $64
[00470D14] Controls.TControl.Perform + $24
[00474A31] Controls.TWinControl.IsControlMouseMsg + $A1
[004C004D] ComCtrls.TToolBar.WndProc + $241
[00474668] Controls.TWinControl.MainWndProc + $2C
[0042C430] Classes.StdWndProc + $14



tried it with jikes, too, but that error message is just tooo long to post it (i think its like 200 lines or such)
seriously, i cant figure out how anyone is able to create anything with this engine  :|

if you get a error message, the first thing you should do is search the forum for this message.



Here is a guide to use the jars you downloaded from google code:

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



I would recommend to download the source using eclipse tho, its easier to set up jme that way:

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

Here is a quite usefull link for you that you really should read first

before wanting to start big projects with jME:



here