I have used Box2D examples from Nature of Code before. However, when I tried to run an example today, I got these errors:
No library found for shiffman.box2d
No library found for org.jbox2d.collision.shapes
No library found for org.jbox2d.common
No library found for org.jbox2d.dynamics
Libraries must be installed in a folder named ‘libraries’ inside the sketchbook folder (see the Preferences window).
So I tried to install Box2D from the Contributions Manager. I get the following error. How can I resolve the problem ? Thanks !!
Ok, thank you. I have already downloaded it from the link:
I created a folder called ‘libraries’ under my sketch folder. Not sure which of the files from box2d_processing downloaded folder should be placed directly under ‘libraries’ folder. I have tried to place the jar files under ‘libraries’ but that did not work (box2d_processing.jar, jbox2d-library-2.2.1-ds.jar). I have tried a few different hierarchies of files/folder. But still get the above error messages.
i just follow that link and see that the git files /lib/… are 5 years old,
what i did was follow the link in the readme http://www.shiffman.net/p5/libraries/box2d_processing/box2d_processing.zip
and after download, from there i unzip/copy dir /box2d_processing/ into the ( here existing ) subdir /libraries/
and ( after restart processing (3.4) ) then found examples that work, like
for the full path / where are the JAR files?
in processing3.4 | Files | preferences | find Sketchbook location like:
drive:…\my_Processing3_sketch_location
and after correct copy find
drive:…\my_Processing3_sketch_location\libraries\box2d_processing\library\
jbox2d-library-2.2.1-ds.jar
box2d_processing.jar
jb4x, I solved the problem. I was correctly installing box2d under the ‘libraries’ folder of my sketch. I was opening the sketch program from windows explorer. I realised that I did not change the location in Preferences=>Sketchbook location. After I changed the Sketchbook location under Preferences to the correct folder, it worked !