while running program HelloNode or HelloWorld
HelloNode app = new HelloNode();
app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
Can't find method setDialogBehaviour and variable ALWAYS_SHOW_PROPS_DIALOG. How to fix that. I have searched in AbstractGame.java but there is no method setDialogBehaviour. Plz help i am new in here.
Oh it works fine i made vm path as
-Djava.library.path="/home/linux/NetBeansProjects/JMonkey/lib":"/home/linux/NetBeansProjects/JMonkeyPhisics/impl/ode/lib":"/home/linux/NetBeansProjects/JMonkey/lib/lwjgl/native/linux"
But after running I got some exception…
SEVERE: Exception in game loop
java.lang.IllegalArgumentException: mode can not be null.
at com.jme.scene.Spatial.setLightCombineMode(Spatial.java:1632)
at HelloNode.simpleInitGame(HelloNode.java:59)
at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:527)
at com.jme.app.BaseGame.start(BaseGame.java:71)
at HelloNode.main(HelloNode.java:32)
Oct 29, 2008 3:37:01 AM com.jme.app.BaseSimpleGame cleanup
and my pc turns to less resolution and then back to normal 1024 by 768.
What should i do i run them in Fedora 9, Netbeans 6.1 with Intel Pentium 4, 1.14 GB RAM and 2.93 GHz processor.
may I ask what version of jME you have is it 1.0 from CVS or 2.0 from googlecode?
if it is 2.0 it should be
HelloAnimation app = new HelloAnimation();
app.setConfigShowMode(ConfigShowMode.AlwaysShow);
app.start();
instead
Thanks for quick replying but i got a problem while running… this is the screenshot
init:
deps-jar:
Compiling 53 source files to /home/linux/NetBeansProjects/JMonkeyPhysics/build/classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 5 files to /home/linux/NetBeansProjects/JMonkeyPhysics/build/classes
Copied 3 empty directories to 1 empty directory under /home/linux/NetBeansProjects/JMonkeyPhysics/build/classes
compile:
run:
Oct 29, 2008 3:22:59 AM com.jme.app.BaseGame start
INFO: Application started.
Oct 29, 2008 3:22:59 AM com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
Oct 29, 2008 3:22:59 AM com.jme.system.PropertiesGameSettings load
WARNING: Could not load properties. Creating a new one.
Oct 29, 2008 3:23:00 AM class HelloNode start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1698)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
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:128)
at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(LWJGLPropertiesDialog.java:682)
at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:231)
at com.jme.app.BaseGame.start(BaseGame.java:64)
at HelloNode.main(HelloNode.java:32)
Oct 29, 2008 3:23:00 AM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
Oct 29, 2008 3:23:00 AM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
Oct 29, 2008 3:23:00 AM com.jme.app.BaseGame start
INFO: Application ending.
BUILD SUCCESSFUL (total time: 6 seconds)
how to fix that i set vm path as
-Djava.library.path="/home/linux/NetBeansProjects/JMonkey/lib":"/home/linux/NetBeansProjects/JMonkeyPhisics/impl/ode/lib"
and i am using netbeans 6.1
ensilage said:
Oh it works fine i made vm path as
-Djava.library.path="/home/linux/NetBeansProjects/JMonkey/lib":"/home/linux/NetBeansProjects/JMonkeyPhisics/impl/ode/lib":"/home/linux/NetBeansProjects/JMonkey/lib/lwjgl/native/linux"
But after running I got some exception..
SEVERE: Exception in game loop
java.lang.IllegalArgumentException: mode can not be null.
at com.jme.scene.Spatial.setLightCombineMode(Spatial.java:1632)
at HelloNode.simpleInitGame(HelloNode.java:59)
at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:527)
at com.jme.app.BaseGame.start(BaseGame.java:71)
at HelloNode.main(HelloNode.java:32)
Oct 29, 2008 3:37:01 AM com.jme.app.BaseSimpleGame cleanup
and my pc turns to less resolution and then back to normal 1024 by 768.
What should i do i run them in Fedora 9, Netbeans 6.1 with Intel Pentium 4, 1.14 GB RAM and 2.93 GHz processor.
hmm I'm unsure I run Windows or Kubuntu with Eclipse
[edit]oh wait are your tying to run only
HelloAnimation app = new HelloAnimation();
app.setConfigShowMode(ConfigShowMode.AlwaysShow);
app.start();
this won't do at least the code should look like this
import com.jme.app.SimpleGame;
import com.jme.math.Vector3f;
import com.jme.scene.shape.Box;
/**
* Started Date: Jul 20, 2004<br><br>
* Simple HelloWorld program for jME
*
* @author Jack Lindamood
*/
public class HelloWorld extends SimpleGame{
public static void main(String[] args) {
HelloWorld app=new HelloWorld(); // Create Object
app.setConfigShowMode(ConfigShowMode.AlwaysShow);
// Signal to show properties dialog
app.start(); // Start the program
}
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
}
}
if anything you should open jme->src->jMETest.TutorialGuide and look at the code they have thier another option would be to go to the wiki for jME1.0HERE or jME2.0 HERE
ALSO take a look at THIS
Thanks it works fine now.