Problem with boxwrap2d library.
in
Contributed Library Questions
•
2 years ago
Hello folks,
I downloaded boxwrap2d library n stored it in library folder of processing sketch with folder name "boxwrap2d".
But when I tried to run the following code :
following exception occered:
Exception in thread "Animation Thread" java.lang.NoSuchMethodError: org.jbox2d.dynamics.DebugDraw: method <init>()V not found
at org.jbox2d.testbed.ProcessingDebugDraw.<init>(ProcessingDebugDraw.java:62)
at org.jbox2d.p5.Physics.<init>(Physics.java:173)
at org.jbox2d.p5.Physics.<init>(Physics.java:152)
at sketch_may19c.initScene(sketch_may19c.java:54)
at sketch_may19c.setup(sketch_may19c.java:39)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
How can I resolve this issue.Please help me.
Thanks.
I downloaded boxwrap2d library n stored it in library folder of processing sketch with folder name "boxwrap2d".
But when I tried to run the following code :
- import org.jbox2d.dynamics.contacts.*;
- import org.jbox2d.p5.*;
- import org.jbox2d.dynamics.*;
- import org.jbox2d.common.*;
- import org.jbox2d.collision.*;
- import org.jbox2d.dynamics.joints.*;
- Physics physics;
- void setup() {
- size(640,480);
- frameRate(60);
- initScene();
- }
- void draw() {
- background(0);
- if (keyPressed) {
- //Reset everything
- physics.destroy();
- initScene();
- }
- }
- void initScene() {
- physics = new Physics(this, width, height);
- physics.setDensity(1.0f);
- physics.createRect(300,200,340,300);
following exception occered:
Exception in thread "Animation Thread" java.lang.NoSuchMethodError: org.jbox2d.dynamics.DebugDraw: method <init>()V not found
at org.jbox2d.testbed.ProcessingDebugDraw.<init>(ProcessingDebugDraw.java:62)
at org.jbox2d.p5.Physics.<init>(Physics.java:173)
at org.jbox2d.p5.Physics.<init>(Physics.java:152)
at sketch_may19c.initScene(sketch_may19c.java:54)
at sketch_may19c.setup(sketch_may19c.java:39)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
How can I resolve this issue.Please help me.
Thanks.
1