JDK-8213837 : FX samples cannot load media from download.java.net over http
  • Type: Bug
  • Component: javafx
  • Sub-Component: samples
  • Affected Version: 8,openjfx11
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-11-14
  • Updated: 2020-09-08
  • Resolved: 2018-11-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8u201Fixed openjdk8u212Fixed
Related Reports
Relates :  
Description
The media files loaded by Ensemble8 and HelloMedia are no longer able to load media files from http://download.java.net.
Comments
+1 for backport
15-11-2018

We need to backport this to 8u-dev. 8u webrev: http://cr.openjdk.java.net/~kcr/8213837/8u/webrev.00/ The patch imports cleanly into JDK 8u-dev. There is one additional file in 8u-dev (which was removed from Ensemble in JDK 10) that needs to be patched: apps/samples/Ensemble8/src/samples/java/ensemble/samples/media/alphamediaplayer/AlphaMediaPlayerApp.java The only difference between the jfx-dev patch and the 8u-dev patch is the change to the AlphaMediaPlayerApp.java file.
14-11-2018

Changeset: f4802915ad95 Author: kcr Date: 2018-11-14 13:26 +0100 URL: http://hg.openjdk.java.net/openjfx/jfx-dev/rt/rev/f4802915ad95 8213837: FX samples cannot load media from download.java.net over http Reviewed-by: mbilla
14-11-2018

I can reproduce this on Windows 7 using either JDK 8u192 or JDK 11 + OpenJFX 12 ea. The problem is in reading the file over http. The following works: https://download.oracle.com/otndocs/products/javafx/oow2010-2.mp4 The following fails: http://download.oracle.com/otndocs/products/javafx/oow2010-2.mp4 So the fix will be for the samples and toys to use https rather than http.
14-11-2018

Thanks. I'll fix the copyright year before I push.
14-11-2018

+1 Nit: you can modify the copyright year for all files in webrev (no need for another webrev)..
14-11-2018

Note that Ensemble8 silently fails to load and play media. HelloMedia gives the following error: $ java -cp apps/toys/Hello/dist/Hello.jar hello.HelloMedia >>> Media ERR: MediaException: MEDIA_INACCESSIBLE : could not connect to media ( http://download.oracle.com/otndocs/products/javafx/oow2010-2.mp4)
14-11-2018

Webrev: http://cr.openjdk.java.net/~kcr/8213837/webrev.00/ Simple replacement of "http://download.oracle.com" with "https://download.oracle.com" everywhere it is used.
14-11-2018