--- old/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/ConnectionHolder.java 2019-04-24 14:34:54.844028800 -0700 +++ new/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/ConnectionHolder.java 2019-04-24 14:34:53.511895600 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -256,7 +256,9 @@ } boolean isSeekable() { - return (urlConnection instanceof HttpURLConnection) || (urlConnection instanceof JarURLConnection); + return (urlConnection instanceof HttpURLConnection) || + (urlConnection instanceof JarURLConnection) || + isJRT(); } boolean isRandomAccess() { @@ -297,7 +299,7 @@ Locator.closeConnection(tmpURLConnection); } } - } else if (urlConnection instanceof JarURLConnection) { + } else if ((urlConnection instanceof JarURLConnection) || isJRT()) { try { closeConnection(); @@ -335,6 +337,11 @@ Channels.newChannel(urlConnection.getInputStream()) : Channels.newChannel(inputStream); } + + private boolean isJRT() { + String scheme = uri.getScheme().toLowerCase(); + return "jrt".equals(scheme); + } } // A "ConnectionHolder" that "reads" from a ByteBuffer, generally loaded from --- old/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/Locator.java 2019-04-24 14:35:03.307875100 -0700 +++ new/modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/Locator.java 2019-04-24 14:35:01.979742300 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -417,7 +417,7 @@ } // FIXME: get cache settings from server, honor them - } else if (scheme.equals("file") || scheme.equals("jar")) { + } else if (scheme.equals("file") || scheme.equals("jar") || scheme.equals("jrt")) { InputStream stream = getInputStream(uri); stream.close(); isConnected = true; --- old/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java 2019-04-24 14:35:11.672711500 -0700 +++ new/modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java 2019-04-24 14:35:10.286572900 -0700 @@ -61,7 +61,8 @@ private static final String[] PROTOCOLS = { "file", "http", - "https" + "https", + "jrt" }; private static GSTPlatform globalInstance = null;