A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/nativelibs4java/BridJ/wiki/Build below:

Build · nativelibs4java/BridJ Wiki · GitHub

BridJ is built as part of the NativeLibs4Java sub-projects.

This will build all of NativeLibs4Java's projects, including JNAerator. It will take some time, so you'll want to have a coffee during the build (if you've never used Maven before, this can take up to 15 minutes, so that might be enough for two coffees).

Subsequent builds will be much quicker (see next section), and can be launched from your Maven-aware IDE of choice.

# On Debian Bullseye:
sudo apt-get install maven mercurial gcc g++ cmake make openjdk-17-jdk
git clone https://github.com/nativelibs4java/BridJ
cd BridJ
mvn clean install

# Some tests might fail: let us know which ones / on which platform!
# To ignore the failures, try again with:
mvn clean install -DskipTests

BridJ's JARs are in Runtime/Bridj/target (pick bridj-x.x-SNAPSHOT.jar if you don't have specific size needs).

JAR File C C++ COM MFC Objective-C .NET Windows MacOS X Linux Solaris FreeBSD bridj-x.x-SNAPSHOT.jar x x x x x x x x x x bridj-x.x-SNAPSHOT-c-only.jar x x x x x bridj-x.x-SNAPSHOT-windows-only.jar x x x x x x bridj-x.x-SNAPSHOT-unix-only.jar x x x x x x bridj-x.x-SNAPSHOT-macosx-only.jar x x x x Porting to a new platform

TODO(ochafik): update this section w/ Docker / GitHub actions instructions.

See README.md at the root of the repo.

When building on a platform not supported by BridJ, you must update getEmbeddedLibraryPaths in Platform.java so it can find your binary at runtime (also check JNI.java for good measure).

About BridJ's source code

BridJ contains Java and C code.

Some of its sources are autogenerated from Velocity templates. For instance, all the Pointer.getInt, .setInt, getFloat, .setFloat... are generated automatically from a template.

So if you look for Pointer.java and JNI.java, they're not directly in the source control : they're created during the Maven build from their template located in src/main/velocity.

Likewise, some test classes are autogenerated, which helps cover more cases with less code (there's even autogenerated C functions in the test library, that is matched by the corresponding autogenerated test cases on the Java side).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4