--- 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