You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Putting this here to get the brain worm in people's minds.
Right now lwjgl extracts native libraries at runtime. This is because shared libraries need to be on the filesystem to be loaded and libraries in the Java world are distributed as jars.
However the JDK doesn't do this, it's native libraries just go in a lib folder in the distribution and they are just available.
The way this is managed is that the jdk is assembled from jmod files. These are like jars but have dedicated sections for classes, libs, binary files, man pages, etc. When you link a jdk it just gets everything in the right place.
The big barrier here is tooling. It is certainly possible to use JMODs as intended or even to extract them and split usage between the --module-path and -Dsystem.library.path.
There is also a slow burn JDK project to add "hermetic Java" as a distribution method. This (based on my read of the mailing list) will allow for bundling everything into a single exe including native libraries in a new static-lib section in the jmod (which of course is all very preliminary).
So just stuff to look into. I know it's a very incremental benefit at the cost of a mountain of tooling issues, but I also think it's a better world to live in if it can be made real.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Putting this here to get the brain worm in people's minds.
Right now lwjgl extracts native libraries at runtime. This is because shared libraries need to be on the filesystem to be loaded and libraries in the Java world are distributed as jars.
However the JDK doesn't do this, it's native libraries just go in a lib folder in the distribution and they are just available.
The way this is managed is that the jdk is assembled from jmod files. These are like jars but have dedicated sections for
classes,libs, binary files, man pages, etc. When you link a jdk it just gets everything in the right place.The big barrier here is tooling. It is certainly possible to use JMODs as intended or even to extract them and split usage between the --module-path and -Dsystem.library.path.
There is also a slow burn JDK project to add "hermetic Java" as a distribution method. This (based on my read of the mailing list) will allow for bundling everything into a single exe including native libraries in a new
static-libsection in the jmod (which of course is all very preliminary).So just stuff to look into. I know it's a very incremental benefit at the cost of a mountain of tooling issues, but I also think it's a better world to live in if it can be made real.
Beta Was this translation helpful? Give feedback.
All reactions