JDK-8179024 : FX Samples broken
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-04-20
  • Updated: 2017-09-25
  • Resolved: 2017-09-25
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 10
10Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8184239 :  
JDK-8184241 :  
JDK-8186011 :  
Description
jjs cd jdk9/nashorn/samples

jjs -fx barchart_weather.js
Caused by: java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL: http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json

jjs -fx browser_dom.js
Doesn't print in console
Works in JDK8

jjs -fx colorfulcircles.fx
Caused by: fx:bootstrap.js:47 TypeError: Cannot load script from colorfulcircles.fx
Doesn't work in JDK8 either

jjs -fx datepick.js
Caused by: datepick.js:48 ReferenceError: "Scene" is not defined
Works in JDK8

jjs -fx filebrowser.js -- .
Caused by: java.lang.BootstrapMethodError: call site initialization exception
Works in JDK8

jjs -fx jsonviewer.js
Caused by: java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 401 for URL: http://api.openweathermap.org/data/2.5/forecast/daily?q=Chennai&mode=json&units=metric&cnt=7`
Doesn't work in JDK8

All other work



Comments
diff -r e36e62d3ea53 samples/barchart_weather.js --- a/samples/barchart_weather.js Fri Apr 07 09:27:26 2017 +0100 +++ b/samples/barchart_weather.js Thu Apr 20 12:38:08 2017 -0300 @@ -60,7 +60,7 @@ } // change URL for your city here! -var url = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json"; +var url = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json&appid=9b2982987c080ae88d81f081dcb129e8"; // download JSON document and parse var json = readTextFromURL(url); diff -r e36e62d3ea53 samples/jsonviewer.js --- a/samples/jsonviewer.js Fri Apr 07 09:27:26 2017 +0100 +++ b/samples/jsonviewer.js Thu Apr 20 12:38:08 2017 -0300 @@ -103,7 +103,7 @@ return item; } -var DEFAULT_URL = "http://api.openweathermap.org/data/2.5/forecast/daily?q=Chennai&mode=json&units=metric&cnt=7`"; +var DEFAULT_URL = "http://api.openweathermap.org/data/2.5/forecast?q=chennai,india&units=metric&mode=json&appid=9b2982987c080ae88d81f081dcb129e8"; var url = arguments.length == 0? DEFAULT_URL : arguments[0]; var obj = JSON.parse(readTextFromURL(url));
20-04-2017