jMonkey and JLink

I do use jME + a jlinked runtime for the MyWorld client - I’m just not able to jlink everything together into a single image. The build is very simple, and with a trivial launcher script it’s quite clean and maintainable.

This is an area I’ve never done anything in, so this is just a guess… but usually it’s reflection that trips up automated tools (Graal native image, for example, can require some auxiliary information beyond the source code for reflection-heavy code), but so far as I know jME only uses reflection in native resource freeing, the networking engine, the serialization library, and maybe one or two other places that I’m not thinking of right now. Reflection is a tricky area with modularized code though, because of access to non-public class members across module boundaries. There are ways around it (opening a module to another), but they require a bit of legwork. Any such issues would come up at runtime for each person using the modularized serialization, but it may not be much of an issue in practice if the reflection is only touching public members. This is an area I haven’t delved into personally. TLDR, I think this stands a reasonable shot at working, but may require some manual intervention.

1 Like