jMonkeyEngine without IDE (only JDK)

Hello all,

I do not use Eclipse IDE or NetBeans IDE, I developing java apps with notepad and with simple cmd line: javac *.java

Where can I found a tutorial about jMonkeyEngine without IDE. I want to setting up or install jMonkeyEngine to my JDK folder, but I do not know how to do it.

Thanks in advance!

1 Like

Its possible, but why?

If you develop using Eclipse or Netbeans or any other IDE you can easily browse the jme source for examples and see how things are done.

It's easy. Download a stable jme distribution. Put the jars files and the .so, .dll files in a local directory (lets call it "jme2").



Done.



When you compile your project add a -cp option like:



javac -cp .;x:jme2*



and when you have to run it use the -Djava.library.path option like:



java -cp .;x:jme2* -Djava.library.path=x:jme2



In the zip files there are some os specific jars and libraries, just choose according to your os.

Core-Dump said:

Its possible, but why?
If you develop using Eclipse or Netbeans or any other IDE you can easily browse the jme source for examples and see how things are done.

I want to using NetBeans or Eclipse, but I need internet connexion on my computer to install jMonkeyEngine on Eclipse or NetBeans.
Core-Dump, if you suggest me to using NetBeans or Eclipse, please give me a tutorial for installing jMonkeyEngine offline on NetBeans and Eclipse using Windows XP.
pgi, Thanks for help. I will try your solution.

In Netbeans you can create a global library or a project template.

A project template acts as a plug-in for the IDE.

Here's a sample of it: http://www.tukano.it/jme2sample.zip

The zip contains a it-tukano-jme2sample.nbm file, extract that file somewhere

Open netbeans, menu tools -> plugins -> downloaded tab -> add plugins -> find and select the "it-tukano-jme2sample.nbm" file -> press install

Now if you create a new project you will find a "JME 2 Empty Project" in the "Java" section. That's it.



Ps.: the nbm plugin in that zip is just a super stripped down sample, you can follow this guide to create a better one



http://platform.netbeans.org/tutorials/nbm-projectsamples.html

pgi, When I trying to install this plugin, appear the following error ( NetBeans IDE 6.7.1 ):

Some plugins require plugin Swing Layout Extensions integration to be installed.
The plugin Swing Layout Extensions integration is requested in version >= 1.10.1.103 but only 1.7.1.103 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin Project API to be installed.
The plugin Project API is requested in version >= 1.28.1 but only 1.24.2 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin Project UI API to be installed.
The plugin Project UI API is requested in version >= 1.40.1.6 but only 1.35.1.6 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin UI Utilities API to be installed.
The plugin UI Utilities API is requested in version >= 7.19.1.1 but only 7.8.2.1 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin Dialogs API to be installed.
The plugin Dialogs API is requested in version >= 7.13.1 but only 7.10.1 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin File System API to be installed.
The plugin File System API is requested in version >= 7.32.1.1.1 but only 7.21.1.1.1 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin Datasystems API to be installed.
The plugin Datasystems API is requested in version >= 7.10.1 but only 7.5.2 was found.  The following plugin is affected:       nbjme2project
Some plugins require plugin Utilities API to be installed.
The plugin Utilities API is requested in version >= 7.31.2.1 but only 7.22.1.1 was found.  The following plugin is affected:       nbjme2project  Some plugins not installed to avoid potential installation problems.

It's for Netbeans 6.8. In any case that plug-in isn't complete (to minimize the test i didn't include the jme tests that are quite useful when learning JME).

pgi, I installed NetBeans 6.8 and I can install "it-tukano-jme2sample.nbm" now, but when I create a new project "jme2sample", netbeans said me a error.

Please see the attached image of this message.

Maybe, this project not include jMonkeyEngine.

I solved this error. I imported all .jar files for fix it and jme works now, but an new error appear:

Native library not set - go to
http://www.jmonkeyengine.com/wiki/doku.php?id=no_lwjgl_in_java.library.path
for details.
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:1028)
        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 jme2project.main(jme2project.java:17)


I understnad this error, I must fix the jogl library path, but I do not know how to do it.
Edit:
This error appear when I try to run "jme2project" class, so, I can compile my project successfully, but can't not run it.

that's unexpected. The dlls should be in the root folder of the new project and AFAIK that directory is the working dir of the netbeans java program - which is automatically inserted in the library path.

I solved my problem, I imported java.library.path manually in NetBeans, I forgot to tell you, I use Linux Ubuntu currently and here is some error, it's a big difference betwen Windiws OS and Linux.

I have succeeded with the help of pgi. I can make games now! Yahoo!

Special thanks to pgi.

And thanks to Core-Dump for his message.

Happy codings!