LWJGL / lwjgl3-osgi

OSGi support for LWJGL 3
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Broken JPMS modules #12

Open io7m opened 2 years ago

io7m commented 2 years ago

The OSGi bundles combine the natives modules into bundles in order for them to use the standard OSGi library loading mechanisms. Unfortunately, the natives modules include module descriptors that look like this:

module org.lwjgl.jemalloc.natives {
  requires org.lwjgl.jemalloc;

  opens linux.x64.org.lwjgl.jemalloc;
}

The important line is the opens line: The natives modules are open for reflection, and this is used to find native libraries when the bundles are used on the JPMS module path. Without that opens section, the native libraries can't be located when the bundles are used on the JPMS module path. I'm not certain how to fix this; we might need to rewrite the module descriptors when multiple modules are combined into a single bundle.