Skip to content
Tilmann edited this page Jan 3, 2019 · 14 revisions

How to set-up maven dependencies

ode4j consists of several maven artifacts.

The core artifact contains the complete physics engine:

<dependency>
    <groupId>org.ode4j</groupId>
    <artifactId>core</artifactId>
    <version>0.4.0</version>
</dependency>

WARNING - THIS FOLLOWING GUIDE IS INCOMPLETE

If you also want the tests, demos or C-style wrapper, you get the complete project with:

<dependency>
    <groupId>org.ode4j</groupId>
    <artifactId>demo</artifactId>
    <version>0.4.0</version>
</dependency>

This parent artifact contains the following sub-artifacts:

  • core: The physics engine core.
  • demo: The demos.
  • core-cpp: A C-style wrapper around the core. This resembles the API of the original ODE library. This can be useful when migrating code from C\C++ to java.
  • demo-cpp: Same as demos, but based on the core-cpp API. This also includes the JUnit tests.

Note that the demos have dependencies on lwjgl and junit. If you want to use the demos, you need to set up the mavennatives plugin.

When running the demos, you need to specify the following VM argument:

-Djava.library.path=target/natives

The maven repo is hosted here.

Troubleshooting

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

You need to add -Djava.library.path=target/natives as VM argument when running a demo

Clone this wiki locally