On Tue, 11 Feb 2020 22:23:41 GMT, Alexander Matveev <[email protected]>
wrote:
>> As an alternative, the "iPod" strategy can be used.
>> For some reasons, the "ipod-library" protocol is supported in the code
>> (Locator), and if that is found, most connection code is bypassed.
>> That strategy seems to be much more difficult to maintain though.
>
> "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.
-------------
PR: https://git.openjdk.java.net/jfx/pull/109