Please Help : jME and Netbeans 6.0 problem

Hello All :slight_smile:



I have been trying to get jME set up within Netbeans 6.0 and have run into some problems which I was hoping someone could help me sort out.



I have been following the wiki instructions for setting up jME with Netbeans 5.0 (and 5.5) which I appreciate are instructions for a different Netbeans version to the one I am using however I thought that the differences wouldnā€™t or shouldnā€™t be a problem. Maybe they are?



I have followed the instructions and I have ended up with a java project called jME (built using an existing source).



When I ā€˜clean and build itā€™ I get the following output:

[pre]

clean:

Deleting directory C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

Deleting directory C:Program FilesJavaJMonkey Engine StuffJME_CVSjmedatadoc

init:

jmeKeyStore

Created dir: C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

Created dir: C:Program FilesJavaJMonkey Engine StuffJME_CVSjmedatadoc

compile:

Created dir: C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuildcom

Copying 28 files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuildcom

Copied 104 empty directories to 72 empty directories under C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuildcom

Compiling 1387 source files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:41: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

import sun.misc.Service;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:42: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

import sun.misc.ServiceConfigurationError;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:187: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

            throws ServiceConfigurationError {

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:189: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

            Iterator displayProviders = Service.providers(SystemProvider.class);

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmeutilloggingBetterFormatter.java:22: warning: sun.security.action.GetPropertyAction is Sun proprietary API and may be removed in a future release

            .doPrivileged(new sun.security.action.GetPropertyAction(

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:57: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release

            value = new sun.misc.BASE64Decoder().decodeBuffer(newvalue);

                                ^

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:85: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release

    String sResult = new sun.misc.BASE64Encoder().encode(value);

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

7 warnings

BUILD SUCCESSFUL (total time: 25 seconds)

[/pre]



When I ā€˜testā€™ it I get the following output:



[pre]

init:

jmeKeyStore

compile:

Compiling 1387 source files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:41: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

import sun.misc.Service;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:42: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

import sun.misc.ServiceConfigurationError;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:187: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

            throws ServiceConfigurationError {

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:189: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

            Iterator displayProviders = Service.providers(SystemProvider.class);

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmeutilloggingBetterFormatter.java:22: warning: sun.security.action.GetPropertyAction is Sun proprietary API and may be removed in a future release

            .doPrivileged(new sun.security.action.GetPropertyAction(

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:57: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release

            value = new sun.misc.BASE64Decoder().decodeBuffer(newvalue);

                                ^

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:85: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release

    String sResult = new sun.misc.BASE64Encoder().encode(value);

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

7 warnings

compile-test:

Compiling 248 source files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

Note: C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrcjmetestTestChooser.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

Copying 122 files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuildjmetest

BUILD SUCCESSFUL (total time: 17 seconds)

[/pre]



And when I run it, I get the following output and the chosen test demo runs.



[pre]

init:

jmeKeyStore

compile:

Compiling 1387 source files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:41: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

import sun.misc.Service;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:42: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

import sun.misc.ServiceConfigurationError;

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:187: warning: sun.misc.ServiceConfigurationError is Sun proprietary API and may be removed in a future release

            throws ServiceConfigurationError {

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmesystemDisplaySystem.java:189: warning: sun.misc.Service is Sun proprietary API and may be removed in a future release

            Iterator displayProviders = Service.providers(SystemProvider.class);

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmeutilloggingBetterFormatter.java:22: warning: sun.security.action.GetPropertyAction is Sun proprietary API and may be removed in a future release

            .doPrivileged(new sun.security.action.GetPropertyAction(

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:57: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release

            value = new sun.misc.BASE64Decoder().decodeBuffer(newvalue);

                                ^

C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrccomjmexxmltypesSchemaBase64Binary.java:85: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release

    String sResult = new sun.misc.BASE64Encoder().encode(value);

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

7 warnings

compile-test:

Compiling 248 source files to C:Program FilesJavaJMonkey Engine StuffJME_CVSjmebuild

Note: C:Program FilesJavaJMonkey Engine StuffJME_CVSjmesrcjmetestTestChooser.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

run-testchooser:

07-Jan-2008 15:22:48 jmetest.TestChooser start

INFO: Composing Test listā€¦

07-Jan-2008 15:22:49 jmetest.TestChooser find

INFO: Searching for Demo classes in ā€œjmetestā€.

07-Jan-2008 15:22:49 com.jme.scene.Node <init>

INFO: Node created.

07-Jan-2008 15:22:55 com.jme.app.BaseGame start

INFO: Application started.

07-Jan-2008 15:22:55 com.jme.system.PropertiesIO <init>

INFO: PropertiesIO created

07-Jan-2008 15:22:55 com.jme.system.PropertiesIO load

INFO: Read properties

07-Jan-2008 15:23:00 com.jme.input.joystick.DummyJoystickInput <init>

INFO: Joystick support is disabled

07-Jan-2008 15:23:00 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

07-Jan-2008 15:23:00 com.jme.system.PropertiesIO save

INFO: Saved properties

07-Jan-2008 15:23:00 com.jme.app.BaseSimpleGame initSystem

INFO: jME version 1.0

07-Jan-2008 15:23:00 com.jme.renderer.lwjgl.LWJGLRenderer <init>

INFO: LWJGLRenderer created. W:  640H: 480

07-Jan-2008 15:23:00 com.jme.app.BaseSimpleGame initSystem

INFO: Running on: ati2dvag

Driver version: 6.14.10.6618

ATI Technologies Inc. - ATI Mobility Radeon X1400 x86/SSE2 - 2.0.5883 WinXP Release

07-Jan-2008 15:23:00 com.jme.renderer.AbstractCamera <init>

INFO: Camera created.

07-Jan-2008 15:23:00 com.jme.util.lwjgl.LWJGLTimer <init>

INFO: Timer resolution: 1000 ticks per second

07-Jan-2008 15:23:00 com.jme.scene.Node <init>

INFO: Node created.

07-Jan-2008 15:23:00 com.jme.scene.Node <init>

INFO: Node created.

07-Jan-2008 15:23:00 com.jme.scene.Node attachChild

INFO: Child (FPS label) attached to this node (FPS node)

07-Jan-2008 15:23:01 com.jme.scene.Node attachChild

INFO: Child (sphere) attached to this node (rootNode)

07-Jan-2008 15:23:01 com.jme.scene.Node attachChild

INFO: Child (cloth) attached to this node (rootNode)

07-Jan-2008 15:23:04 com.jme.app.BaseSimpleGame cleanup

INFO: Cleaning up resources.

07-Jan-2008 15:23:04 com.jme.app.BaseGame start

INFO: Application ending.

BUILD SUCCESSFUL (total time: 30 seconds)

[/pre]



So from the above, I am assuming that everything is fine so far.



I have omitted the jME Physics 2 steps as right now I donā€™t need to use it.



Now, again following the tutorial for using the compiled cvs version of jME in my own project, I have ended up with the following project structure (see image)ā€¦







Below is my code for the HelloWorld tutorial - there are no required imports as my project cannot find the correct classes.



[pre]

/*

  • To change this template, choose Tools | Templates
  • and open the template in the editor.

    */

    package org.redboffin.gs.tutorials;



    /**

    *
  • @author Red Boffin

    */

    public class HelloWorld extends SimpleGame {



        public static void main(String[] args) {

            HelloWorld app = new HelloWorld(); // Create Object

            // Signal to show properties dialog

            app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);

            app.start(); // Start the program

        }



        protected void simpleInitGame() {

            // Make a box

            Box b = new Box("Mybox", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));

            rootNode.attachChild(b); // Put it in the scene graph

        }

       

    }

    [/pre]



    output when I try to run the 'HelloWorld' tutorial:



    [pre]

    init:

    deps-clean:

    Deleting directory C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1build

    clean:

    init:

    deps-jar:

    Created dir: C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1buildclasses

    Compiling 1 source file to C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1buildclasses

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:13: cannot find symbol

    symbol: class SimpleGame

    public class HelloWorld extends SimpleGame {

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:18: cannot find symbol

    symbol  : variable SimpleGame

    location: class org.redboffin.gs.tutorials.HelloWorld

            app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:19: cannot find symbol

    symbol  : method start()

    location: class org.redboffin.gs.tutorials.HelloWorld

            app.start(); // Start the program

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:24: cannot find symbol

    symbol  : class Vector3f

    location: class org.redboffin.gs.tutorials.HelloWorld

            Box b = new Box("Mybox", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:24: cannot find symbol

    symbol  : class Vector3f

    location: class org.redboffin.gs.tutorials.HelloWorld

            Box b = new Box("Mybox", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:24: internal error; cannot instantiate javax.swing.Box.<init> at javax.swing.Box to ()

            Box b = new Box("Mybox", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));

    C:Documents and SettingsRed BoffinMy DocumentsMy ProjectsGSGS 0.0.1srcorgredboffingstutorialsHelloWorld.java:25: cannot find symbol

    symbol  : variable rootNode

    location: class org.redboffin.gs.tutorials.HelloWorld

            rootNode.attachChild(b); // Put it in the scene graph

    7 errors

    BUILD FAILED (total time: 0 seconds)

    [/pre]



    I am obviously doing something wrong but I can't tell from the tutorials where I am going wrong.



    Can anyone help me get jME working within my project within Netbeans 6.0 and once I have got it working with your help, I'd be happy to write it up as a guide for future reference on the wiki.



    Thank you for reading this far.



    Red Boffin

You are missing all of the jME jars in your libraries. I'm not sure how you created the "jME-compile" library, but something is apparently wrong with it. Try creating a new library in the library manager, containing all of the jars in jME's target directory, and use that instead.

Hello hevee



Thank you for responding.



Can I just clarify a few things?


  1. Is the jME project itself ok?
  2. Are the jME-run libraries ok?
  3. When you say "in jME's target directory" do you literally mean the folder called 'target'? If you do, then I can't find any jars in there!



    Sorry to just reply with more questions. This is all pretty frustrating as I have followed the tutorial instructions to the letter and somethings not working.



    Thanks again
RedBoffin said:

1. Is the jME project itself ok?

Yes it is. But you'll have to build it by running the "dist all" and "dist test" targets in the ant script, just "clean" and "compile", as "clean build" seems to do for you, won't do. You can run specific targets by right-clicking the ant script ("build.xml") in your jME project.
RedBoffin said:

2. Are the jME-run libraries ok?

Yes I think so.
RedBoffin said:

3. When you say "in jME's target directory" do you literally mean the folder called 'target'? If you do, then I can't find any jars in there!

Yes, I was referring to the folder called "target". You'll find the jars after running the "dist" targets as described above.

Hello hevee



Thank you for your help. I have got HelloWorld working in the sense that the required imports are found and the class compiles.



When I run it however, I get the SEVERE: Exception in game loop

java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException



message which has a fix in another thread on this forum - although that fix doesn't work for me - sadly.



Again, thank you for helping me get this far.

SSSSSOOOOO  CLLLOOOSSEEE :slight_smile:



you just need to tell the JVM where the native libraries are.



in NetBeans 5.5 you right click on the project -> select properties -> click run -> Under VM options type

-Djava.library.path="path_to_jME/jme/lib"

Thanks for trying to help me basixs.



My path to the native libraries folder is C:Program FilesJavaJMonkey Engine StuffJME_CVSjmelib



so I add the following into the VM run options: -Dpath.library.path=ā€œC:Program FilesJavaJMonkey Engine StuffJME_CVSjmelibā€



and I get the ā€˜no lwjgl in java.library.pathā€™ errorā€¦ yet itā€™s there in the lib folderā€¦ a sweet little teasing jar fileā€¦



So closeā€¦ and yet soooooooo faaaaaaaaaaaaaaaaaaaaar  :ā€™(

RedBoffin said:

and I get the 'no lwjgl in java.library.path' error... yet it's there in the lib folder... a sweet little teasing jar file...

java.library.path refers to the path for native binary libraries, not java class libraries. So depending on your os, you'll need liblwjgl.so, liblwjgl.jnilib or lwjgl.dll in the place you specified, not lwjgl.jar.

Thank you for clarifying that hevee



The lwjgl.dll (windows xp) file is there as wellā€¦ teasing meā€¦ winking at meā€¦ but refusing to come out to playā€¦

RedBoffin said:

so I add the following into the VM run options: -Dpath.library.path="C:Program FilesJavaJMonkey Engine StuffJME_CVSjmelib"

Sorry for not spotting that earlier, that should read "-Djava.library.path", not "-Dpath.library.path"

Thanks hevee



It was just a typo on my part - the actual string I am using is -Djava.library.path="C:Program FilesJavaJMonkey Engine StuffJME_CVSjmelib"



Sorry for wasting your time on a mere typo in the message.

Did you setup the Libraries correctly (Runtime and compile) and then add them to your Project?


#
go to menue-bar: Tools ā†’ Library Manager
#
press >New Library...<

    *
      set LIBRARY NAME: jME-compile

#
press >OK<
#
press >Classpath<

  1.
      press >Add JAR/Folder...<
  2.
      navigate to: MY_PATH_TO_JME_CVS/jme
  3.
      select: build
  4.
      press >Add JAR/Folder<

#
press >Sources<

  1.
      press >Add JAR/Folder...<
  2.
      navigate to: MY_PATH_TO_JME_CVS/jme
  3.
      select: src
  4.
      press >Add JAR/Folder<

#
press >Javadoc<

  1.
      press >Add ZIP/Folder...<
  2.
      navigate to: MY_PATH_TO_JME_CVS/jme/data
  3.
      select: doc
  4.
      press >Add ZIP/Folder<

#
press >New Library...<

    *
      set LIBRARY NAME: jME-run

#
press >OK<
#
press >Add JAR/Folder...<

  1.
      navigate to: MY_PATH_TO_JME_CVS/jme/lib
  2.
      multi-select: jinput.jar , jogg-0.0.5.jar , jorbis-0.0.12 , lwjgl.jar , lwjgl_fmod3.jar
  3.
      press >Add JAR/Folder<

#
press >OK<