Is there any way to download the compose-desktop library and then link at runtime? Similar to how you can download a .zip of OpenJFX and add the libs/native components to the classpath with the java command. It'd be nice to keep the main JAR cross-platform.
j
jim
04/27/2021, 7:43 PM
I don't think there is a well-blazed trail, but there isn't anything that would make this uniquely challenging relative to other native libraries.
The artifacts are all on maven (which is just a simple http server), so first step would be to download the relevant binaries. You can then add them to your classpath prior to starting the JVM. If you need to load them dynamically after starting the JVM, you will probably need to create a ClassLoader to load the classes and native libraries (sounds scarier than it really is).
👍 1
c
Clay Gillman
04/27/2021, 8:03 PM
Perfect, that seems to work well. It looks like I can even use gradle to make an uber-jar with just the jetpack-compose resources and link that on startup.
Thank you!