Trying to load JBullet examples in Eclipse!

So I placed the jar files in the right directory file, and the natives in the Native Library Location in the Libraries Java Build Path. Everything looks fine and errors until I try to run any of the examples. This is the error I get:

[quote]Exception in thread “main” java.lang.Error: not instrumented
at cz.advel.stack.Stack.alloc(
at com.bulletphysics.collision.shapes.StridingMeshInterface.internalProcessAllTriangles(
at com.bulletphysics.collision.shapes.StridingMeshInterface.calculateAabbBruteForce(
at com.bulletphysics.collision.shapes.BvhTriangleMeshShape.(
at com.bulletphysics.collision.shapes.BvhTriangleMeshShape.(
at com.bulletphysics.demos.vehicle.VehicleDemo.initPhysics(
at com.bulletphysics.demos.vehicle.VehicleDemo.main(
Do these classes need a main class in order to run or am I missing something here?

I’m stumped because I’ve managed this sort of thing before. Does anyone know if it has to do with a particular version of lwjgl or something in particular, does JBullet need lwjgl. I’m using LWJGL2.

Any help would be much appreciated. Thanks.

Scroll down to this bit:
“You cannot run the program directly, as jStackAlloc need to perform so-called instrumentation, which modifies the byte-code. You can then run the modified bytecodes. Write a ANT build file (build.xml) as follows, which invoke the Instrumentation task on the compiled classes and then run from the instrumented-classes.”

Here’s a version of JBullet that doesn’t use jStackAlloc: Hosted via

I use it in my project… Not sure if there’s any negative consequences, but eh, I haven’t noticed anything out of the ordinary yet.

Hey! Thanks orange and archive. Gonna try this out! Much appreciated for the info. :slight_smile:

[quote]<?xml version="1.0" encoding="UTF-8"?>

[/quote] So I made the build.xml file but it failed and gave me this error

C:\myproject\build.xml:13: taskdef class cz.advel.stack.instrument.InstrumentationTask cannot be found
using the classloader AntClassLoader[C:\myproject\bin]
then I tried the build.xml that came with jbullet and wasnt suprised it wouldnt work but im not sure why.

[quote]C:\myproject\nbproject\build-impl.xml:793: The following error occurred while executing this line:
C:\myproject\nbproject\build-impl.xml:337: The for must include junit.jar if not in Ant’s own classpath
so at this point im rather confused but im confident in people to lend me a hand and save me from my ubernoob misery. much appreciated.

whats the best way to use the file for you? I tried using it as a library and also extracted the files, but Eclipse wouldnt recognize the class files. Is there something Im missing? Much appreciated

You just include it the same way you include other libraries (Open the Build Path and click add library).

Got it to work! Thanks to yall for the help! much appreciated!