Installing tutorial for Netbeans (version 2)?

Hi!



I tried to follow the step by step installation tutorial written for jme-physics version 1 - making some changes in order to get version 2 installed from java.net's CVS repository. The downloading went well, but I had problems with compiling the project.



Could somebody update or rewrite the tutorial for jme-physics (2) and Netbeans? It would be super-great!



Thanks,

OLLI

I was able to recently follow that tutorial.  I think a few minor things were different because I had a newer version of netbeans than what the tutorial was written for.  But the reason you might have had issues compiling is I do not think the current version of jmephysics2 works with the current cvs version of jme.  Or at least it wasn't working the last time I tried to get it to work.

tandaur said:

But the reason you might have had issues compiling is I do not think the current version of jmephysics2 works with the current cvs version of jme.

Maybe I'll try getting it to work again, thanks.

jme cvs with jmephysics2 cvs did work for me on wednesday so please update from cvs and try again.

I remember btw that there was something addional to add to the compile classpath ???

Ill have a look and report back.



hth Martin



edit: ah yes and also take this: http://www.jmonkeyengine.com/jmeforum/index.php?topic=3584.0

into account when setting up Your project

also take note the physics2 has, I think, three source folders

winkman said:

jme cvs with jmephysics2 cvs did work for me on wednesday so please update from cvs and try again.


So you followed even the "delete these folders" and "copy these files" parts?

Thanks,
OLLI

P.S. I hope you remember the extra part to the path...

As mcbeth said it's more than one sourcepath

for me it's the following sources to add:

/src

/impl/ode/src

/test

/test-interactive

/tutorial



and the extra classpath entry i mentioned was to junit which sits around in:  …jmephysics/ant/lib/junit.jar



i'm updating from cvs atm so i can't really say if it works or not.



… and errm no actually i didn't ever delete any folders  and copy files ???, maybe because i never followed the tutorial from the wiki  8) so i

can't confirm if it actually works.





edit:  Ok, confirmed last  jmephysics2 cvs compiles and run's fine with last jme cvs.

        … and don't forget to add libodejava.so (edit: / …dll / whatever Your OS needs) to Your Djava.library.path to run it

I tried, and it failed. Then I compiled the jme-physics from "an existing ant source" and Netbeans compiled project "JmePhysics 2" succesfully (under Windows XP). But am I now able to continue the original Netbeans tutorial from "How to compile and run your own jMEphysics-application"? I doubt.



With the earlier version of jme-physics I had no problems at all. Maybe I need that step by step tutorial for this version too… ;(



Thank you all for helping!



OLLI

Hi again.



I notice Per has written a new tutorial, but I wrote my own in meantime (for my own later purposes; short memory ;)waiting for his tutorial. I publish it here if it helps somebody - it's a little different from Per's one. Should I publish it on Wiki too?



________________________________________________________________________________________







Setting up jME and jMEPhysics 2 in Netbeans 5.5



Thanks for Per Rosengren for his great tutorials. This tutorial is a bit more straightforward.





a) You need to have an account in java.net in order to follow this tutorial.

b) Create a BASEFOLDER for your projects, for example C:JavajMEProjects. It's referred as BASEFOLDER from now on.





I) SETTING UP jME



II) SETTING UP jMEPhysics



III) SETTING UP your own jMEPhysics project









I) SETTING UP jME


  1. Start Netbeans and choose CVS->Checkout.


  2. Type :pserver:username@cvs.dev.java.net:/cvs to the "CVS Root".

Thanks for the NetBeans tutorials, the current wiki version works for 5.5 and 5.0 now (I tried).



I am trying to add a paragraph about how to make such a NetBeans project more easily distributable. E.g. if it's a game and you want other people to download it without the IDE…  :wink:



Please have a look at what I added at the end of the tutorial. Did you make an Ant task that turns all your resources into JARs (then NetBeans will do the rest for you automatically), or do you do it all by hand from the commandline?

Hi,

I followed the tutorial but I'm getting this error:



init:
using jME base dir "~/Java/Workspace/jME/jme"
clean.module.physics:
Deleting directory ~/Java/Workspace/jME/jmephysics/classes
clean.module.physics.ode:
clean.all:
init:
using jME base dir "~/Java/Workspace/jME/jme"
compile.module.physics.production:
Created dir: ~/Java/Workspace/jME/jmephysics/classes
Compiling 38 source files to ~/Java/Workspace/jME/jmephysics/classes
~/Java/Workspace/jME/jmephysics/src/com/jmex/physics/geometry/TriMeshMassProperties.java:162: warning: unmappable character for encoding UTF8
             * and if one of the angle is close to 0� or 180�
~/Java/Workspace/jME/jmephysics/src/com/jmex/physics/geometry/TriMeshMassProperties.java:162: warning: unmappable character for encoding UTF8
             * and if one of the angle is close to 0� or 180�
~/Java/Workspace/jME/jmephysics/src/com/jmex/physics/geometry/TriMeshMassProperties.java:165: warning: unmappable character for encoding UTF8
             * if the max angle is close to 180� we must devide the triangle into 2 right-angled triangle
3 warnings
Copying 5 files to ~/Java/Workspace/jME/jmephysics/classes
compile.module.physics.tests:
Compiling 14 source files to ~/Java/Workspace/jME/jmephysics/classes
~/Java/Workspace/jME/jmephysics/test/com/jmex/physics/PhysicsNodeTest.java:49: cannot find symbol
symbol  : constructor TestCase()
location: class junit.framework.TestCase
public class PhysicsNodeTest extends TestCase {
~/Java/Workspace/jME/jmephysics/test/com/jmex/physics/SystemTest.java:46: cannot find symbol
symbol  : constructor TestCase()
location: class junit.framework.TestCase
public class SystemTest extends junit.framework.TestCase {
2 errors
~/Java/Workspace/jME/jmephysics/ant/module_physics.xml:107: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 3 seconds)



I'm not sure whats wrong. Any ideas?

Thanks

OK i've managed to get it to compile by stopping the build.xml from compiling the tests! Still not sure why they won't compile though. I followed the rest of the tutorial and everything seems to work fine except when I run one of the lessons i.e. Lesson2.java as soon as the falling cube hits the floor the app crashes and I'm left with this error:



java.lang.IllegalStateException: Geom with native address 0x8501fd00851c7b8 not found!
        at org.odejava.Geom.getGeomFromNativeAddr(Geom.java:267)
        at org.odejava.collision.Contact.getGeom1(Contact.java:202)
        at com.jmex.physics.impl.ode.OdePhysicsSpace.iterateContacts(OdePhysicsSpace.java:648)
        at com.jmex.physics.impl.ode.OdePhysicsSpace.computeTimeStep(OdePhysicsSpace.java:603)
        at com.jmex.physics.impl.ode.OdePhysicsSpace.update(OdePhysicsSpace.java:555)
        at com.jmex.physics.util.SimplePhysicsGame.update(SimplePhysicsGame.java:121)
        at com.jme.app.BaseGame.start(Unknown Source)
        at jmestart.Lesson1.main(Lesson1.java:99)



Any ideas why this is happening? Just to reiterate it only happens when objects collide.

Thanks

looks like you are using old natives - do you probably have some old odejava.so/dll/jnilib anywhere? (e.g. in your jdk's ext folder?)

irrisor said:

looks like you are using old natives - do you probably have some old odejava.so/dll/jnilib anywhere? (e.g. in your jdk's ext folder?)


Thanks Irrisor, I replaced the odejava file and it works fine now  :D, I noticed a joode folder in the release as well is it possible to use joode with jME?
aceshigh said:

is it possible to use joode with jME?

It is. But note that some stuff is not working, yet, as there's is no support for e.g. cylinders and some of the joints in JOODE.