[Rev 02] RFR: 8238755: allow to create static lib for javafx.media on linux

Kevin Rushforth kcr at openjdk.java.net
Thu Feb 13 23:52:22 UTC 2020


On Wed, 12 Feb 2020 07:49:40 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> "ipod-library" is only supported if IOSPlatform is loaded, but it will not be loaded on all platform due to check for HostUtils.isIOS(). Do you know what happens if user tries "resource" protocol on not supported platform? and same for some "unknown" protocol. If error message makes sense we can probably keep it as is.
> 
> That is not 100% correct. ipod-library is supported in case `System.getProperty("os.name")` starts with "ios" (which we do in GraalVM and OpenJDK/mobile) (which does not guarantee at all that we're on ios). 
> 
> We can encapsulate the "resource" protocol using the same approach (with a System.getProperty check). In that case, it might make sense to use a wide property that indicates we're running on a statically linked image. That would then be useful for all Java code, not just javafx.media. But that is a bigger change, so I'd like @kevinrushforth opinion on this.

It might make sense to add an `isStaticallyLinked` method to [PlatformUtil](https://github.com/openjdk/jfx/blob/master/modules/javafx.base/src/main/java/com/sun/javafx/PlatformUtil.java), which is where similar platform methods are kept.

-------------

PR: https://git.openjdk.java.net/jfx/pull/109


More information about the openjfx-dev mailing list