I am quite new to using packages in Java and I would like to know if there is an easier way to import classes with fewer import statements.
I am using Processing and I have started using Box2D for Processing to create some games.
In order to use the library, I have to add the following to my sketch:
import shiffman.box2d.*;
import org.jbox2d.collision.shapes.*;
import org.jbox2d.common.*;
import org.jbox2d.dynamics.*;
import org.jbox2d.dynamics.joints.*;
To simplify the imports, I have tried:
import shiffman.box2d.*;
import org.jbox2d.*;
However, when I define a body using BodyDef
, I get an error saying that BodyDef
is not defined.
It seems that the error is also mentioning that org.jbox2d.*
is not a package...
Is there a way to have fewer import statements? PDE doesn't seem to include those as well...
Thanks in advance!