This project aims to provide Java bindings to the Wayland backend library. It does so by a combination of auto-generated Java code and appropriate JNI bindings. The main purpose of wayland-java is to service the Android wayland server app that I am currently developing.
The wayland-java library is useable, but I am not yet ready to make guarantees about API stability. There are probably a lot of bugs, but I welcome bug reports! It is working well enough to backend the bits of my app that I have working.
Building wayland-java locally is simple
- Make sure you have libwayland 1.3 or later installed
- Clone git://github.com/jekstrand/wayland-java.git
- Run
gradle install
Building the library for Android requires a slight modification to the wayland source code. I hope to submitting patches to the wayland project soon so that it can be built unaltered. If you're brave enough to try and build wayland-java on Android, you need to do the following:
- Install both the android SDK and NDK and get them configured
- Clone git://github.com/jekstrand/wayland-java.git
- Run
git submodule init
andgit submodule update
- In the protocol/src/main/native/external/wayland directory, you have to modify the wayland source
code to remove calls to
signalfd
andtimerfd
and their respective header files - Make sure that the version of protocol/src/main/native/external/wayland is patched with this patch series
- Use the Android tools to update the build paths in the
android
subdirectory to your version of the Android SDK - Run ant from inside the
android
subdirectory