<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">When I try to build ant create.X3DJSAIL on mac, I get: <span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">    </span><span style="font-family: Menlo; font-size: 11px; background-color: rgb(255, 255, 255);" class="">[javac] /Users/johncarlson/Downloads/<a href="http://www.web3d.org/x3d/stylesheets/java/src/org/web3d/x3d/sai/Shape/X3DAppearanceChildNode.java:55:" class="">www.web3d.org/x3d/stylesheets/java/src/org/web3d/x3d/sai/Shape/X3DAppearanceChildNode.java:55:</a> error: reached end of file while parsing</span><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    [javac] {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    [javac]  ^</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    [javac] 1 error</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">apparently there is a problem with code generation on Mac?</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Your turn?  I may not have gotten all the tooltips from <a href="http://SF.net" class="">SF.net</a>, will keep trying.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">John</span></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 14, 2018, at 9:19 AM, Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">And just notices a little more for you John:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">There is also another block of javascript at the end of that file:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">==================================</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var version = json['X3D']['@version'];</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var docType = DOMImplementation.createDocumentType('X3D', 'ISO//Web3D//DTD X3D '+version+'//EN', '</span><a href="http://www.web3d.org/specifications/x3d-'+version+'.dtd" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://www.web3d.org/specifications/x3d-'+version+'.dtd</a><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">', null);</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var document = DOMImplementation.createDocument(null, 'X3D', docType);</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var mapToMethod = require('nashorn/node/mapToMethod.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var mapToMethod2 = require('nashorn/node/mapToMethod2.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var fieldTypes = require('nashorn/node/fieldTypes.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">load('nashorn/node/X3DJSONLD.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">load('nashorn/node/JavaScriptSerializer.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var child = CreateElement('X3D');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">ConvertToX3DOM(json, '', child, 'flipper.json');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">print('Returning with', child);</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var output = new JavaScriptSerializer().serializeToString(json, child, '../nashorn/examples/HelloWorldProgramOutput.Nashorn.js', mapToMethod, fieldTypes);</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var FileWriter = Java.type('java.io.FileWriter');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">var fw = new FileWriter('../nashorn/examples/HelloWorldProgramOutput.Nashorn.js');</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fw.write(output);</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fw.close();</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">==================================</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">and now for an "oh duh" moment - I was thinking JSON but the file extension is .js so this might all be an OK application of your code.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">... in which case this narrowing of the problem remains appropriate, how is that file read and what is wrong?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">again "good hunting" as you continue exploring out there, pushing onward in the tall grass...   8)</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On 6/14/2018 7:23 AM, Don Brutzman wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On 6/13/2018 11:13 PM, John Carlson wrote:<br class=""><blockquote type="cite" class="">Are you sure those classpaths are portable?<br class=""></blockquote>Not personally (i use windows, sometimes centos linux on server) but that statement by Ant wouldn't stand if it weren't true.  This is part of original Ant design (read "Ant in Anger" to learn a lot about coding!) so it would not slip by unfixed.<br class="">    Apache Antâ„¢ in Anger: Using Apache Ant in a Production Development System<br class="">    Steve Loughran, Last updated 2005-03-16<br class="">    <a href="https://ant.apache.org/ant_in_anger.html" class="">https://ant.apache.org/ant_in_anger.html</a><br class="">Further when I changed semicolon ; to colon : in build.xml classpath, everything still "worked" but had the exact same outputs and exceptions as before.<br class="">If there is a problem (different than what I saw) in node.js or in jjs shell implementations of JavaScript, you'd have to sleuth that because it is not occurring for me.   So that is not a problem in Ant.<br class=""><blockquote type="cite" class="">I was hoping to make them like the ones in java/build.xml if at all possible.<br class=""></blockquote>All of the java build.xml files throughout multiple different distributions are using semicolons with no identified problems.  I don't think that is the culprit.<br class=""><blockquote type="cite" class="">Also, I want you to debug the Java, not ant, JavaScript or nashorn.  See message with just the java class in it.<br class=""><br class="">John<br class=""></blockquote>The exception that I get (shown below) reports<br class="">    javax.script.ScriptException: TypeError: Cannot load script from nashorn/jvm-npm.js<br class="">which has a header saying it is your modified version of an open-source nashorn file.  so i won't be sleuthing your custom jvm-npm.js (though you might want want to avoid customizations for future compatibility).<br class="">next part of exception:<br class="">    in ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js at line number 1<br class="">which seems to indicate that the ...intermediate.js file either wasn't writable, wasn't written, had a length of zero bytes, or wasn't readable by jvm-npm.js<br class="">when i look for that intermediate output file on my system, i do find it.  36KB, current time stamp (not an old file), attached to this mail for your inspection.<br class="">the first lines of that attached file are<br class="">=========================================<br class="">load('nashorn/jvm-npm.js');<br class="">load('nashorn/repeatPolyfill.js');<br class="">var xmldom = require('nashorn/node_modules/xmldom');<br class="">var DOMParser = xmldom.DOMParser;<br class="">var XMLSerializer = new xmldom.XMLSerializer();<br class="">var DOMImplementation = new xmldom.DOMImplementation();<br class="">var json = { "X3D": {<br class="">    "encoding":"UTF-8",<br class="">    "@profile":"Immersive",<br class="">    "@version":"3.3",<br class="">[etc.]<br class="">=========================================<br class="">so... it appears that you have some (6 and a half) other lines of Javascript source at the beginning of this X3D JSON output file created by your serializer.<br class="">and presumably (i'm guessing) that is what the "javax.script.ScriptException: TypeError" exception is reporting, that it couldn't load a JSON file that started with Javascript source.<br class="">so i recommend you next look at the code producing HelloWorldProgramOutput.Nashorn.js.intermediate.js which will either be (a) your X3DJSONLD serializer or (b) my X3dToJson.xslt stylesheet or (c) something in the build file or another script.  Probably one of these has unintentionally prepended the offending 6.5 lines of code preceding the X3D JSON.<br class="">at this point, it would be good to confirm you are seeing the same outputs on your system.  if not, then you and i might have a versionitis problem causing confusion.<br class="">hope this sleuthing gets the spotlight closer to the problem cause. good luck John!<br class=""><blockquote type="cite" class="">On Wed, Jun 13, 2018, 9:29 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> wrote:<br class=""><br class="">    On 6/8/2018 12:12 AM, John Carlson wrote:<br class="">     > I would like for you to make the classpaths portable between windows and Ubuntu in<span class="Apple-converted-space"> </span><a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml" class="">www.web3d.org/x3d/stylesheets/java/nashorn/build.xml</a><<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml" class="">http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml" class="">http://www.web3d.org/x3d/stylesheets/java/nashorn/build.xml</a>> .  Search for ;<br class=""><br class="">    OK understood now.  First some background:<br class=""><br class="">    1. Ant classpath is supposed to be colon/semicolon agnostic, regardless of operating system.<br class="">   <span class="Apple-converted-space"> </span><a href="https://ant.apache.org/manual/using.html" class="">https://ant.apache.org/manual/using.html</a><br class=""><br class="">    2. You own the nashorn subdirectory tree so you can do anything you want there.  I can followup by confirming elsewhere.<br class=""><br class="">    3. I am running<br class=""><br class="">    don@it154928 ~<br class="">    $ java -version<br class="">    java version "1.8.0_172"<br class="">    Java(TM) SE Runtime Environment (build 1.8.0_172-b11)<br class="">    Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)<br class=""><br class="">    4.I went into that build.xml and changed entries like<br class=""><br class="">             classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name <<a href="http://jsai.full.archive.jar.name/" class="">http://jsai.full.archive.jar.name</a>>}<br class="">    to<br class="">             classpath="${java.classes.dir}:${java.jars.dir}/${jsai.full.archive.jar.name <<a href="http://jsai.full.archive.jar.name/" class="">http://jsai.full.archive.jar.name</a>>}<br class=""><br class="">    5. That change had no effect on output of build.xml test.nashorn, copy follows<br class="">    ==============================================================================<br class="">    ant -f E:\\x3d-code\\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\\x3d\\stylesheets\\java\\nashorn test.nashorn<br class="">    test.nashorn:<br class="">    Compile:<br class="">    Compiling 1 source file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\classes<br class="">    Compiling 1 source file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\classes<br class="">    Copy:<br class="">    Copying 1 file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples<br class="">    Copying E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d<br class="">    Copying 1 file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples<br class="">    Copying E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json<br class="">    Run:<br class="">    parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">    parameter: "-tojs" for conversion to X3DJSONLD JavaScript source<br class="">    parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Nashorn<br class="">    convert to JS JavaScript:<br class="">    Warning: toFileJavaScript() is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js<br class="">    Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">    Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">    [Error] TODO problem handling local exception within CommandLine, exiting<br class="">    org.web3d.x3d.sai.X3DException: ScriptException when processing fileName ..\nashorn\examples\HelloWorldProgramOutput.Nashorn.js.intermediate.js, unable to save result: javax.script.ScriptException: TypeError: Cannot load script from nashorn/jvm-npm.js in ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js at line number 1<br class="">             at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1662)<br class="">             at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:628)<br class="">             at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)<br class="">    parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">    parameter: "-toJSON" for conversion to JSON encoding<br class="">    parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Java.json" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Java<br class="">    convert to JSON:<br class="">    Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Java.json<br class="">    Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">    Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">    file conversion successful: HelloWorldProgramOutput.Java.json (40043 bytes)<br class="">    parameter: source file HelloWorldProgramOutput.x3d filesize 21195 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">    parameter: "-toX3D" for conversion to X3D encoding<br class="">    parameter: "-toFile" "../nashorn/examples/HelloWorldProgramOutput.Java.x3d" for result file name root ../nashorn/examples/HelloWorldProgramOutput.Java<br class="">    convert to X3D:<br class="">    Warning: toFileX3D() is overwriting prior file ../nashorn/examples/HelloWorldProgramOutput.Java.x3d<br class="">    file conversion successful: HelloWorldProgramOutput.Java.x3d (21195 bytes)<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.Java.x3d<br class="">    1 file(s) have been successfully validated.<br class="">    1 file(s) have been successfully validated.<br class="">    matches HelloWorldProgramOutput.x3d: true<br class="">    ===========================================<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.Java.json<br class="">    matches HelloWorldProgramOutput.json: true<br class="">    ===========================================<br class="">    script:<br class="">    ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js<br class="">    Result: 102<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.Java.x3d<br class="">    matches HelloWorldProgramOutput.Nashorn.js.new.x3d: false<br class="">    ===========================================<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.Java.json<br class="">    matches HelloWorldProgramOutput.Nashorn.js.new.json: false<br class="">    ===========================================<br class="">    ../nashorn/examples/Nashorn.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js<br class="">    Result: 102<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.x3d<br class="">    matches Nashorn.x3d: false<br class="">    ===========================================<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.x3d<br class="">    matches Nashorn0.x3d: false<br class="">    ===========================================<br class="">    ../nashorn/examples/Json.js:1 TypeError: Cannot load script from nashorn/node/X3Dautoclass.js<br class="">    Result: 102<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.x3d<br class="">    matches Json.x3d: false<br class="">    ===========================================<br class="">    HelloWorldProgramOutput.json<br class="">    matches Json.json: false<br class="">    BUILD SUCCESSFUL (total time: 18 seconds)<br class="">    ==============================================================================<br class=""><br class="">    so more sleuthing needed... hope this comparison testing helps.<br class=""><br class="">    v/r Don<br class=""><br class=""><br class="">     > On Fri, Jun 8, 2018, 1:39 AM Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>> wrote:<br class="">     ><br class="">     >     Apologies John, not tracking you on this one.  readAllBytes is in your code, not clear if you want me to replace a classpath separator with colon in documentation - or what.<br class="">     ><br class="">     >     Please advise, TIA.<br class="">     ><br class="">     >     On 6/7/2018 8:56 PM, John Carlson wrote:<br class="">     >      > Then hold at jdk 8.   Doesn't mean you can't fix a bug that's unrelated to JDK 8.<br class="">     >      ><br class="">     >      > On Thu, Jun 7, 2018, 11:46 PM Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>>> wrote:<br class="">     >      ><br class="">     >      >     Sorry but no, advancing a version in Java is a slippery slope if everything can't advance together.  Am holding at JDK 8 until Netbeans (and thus X3D-Edit) gets upgraded to JDK 9 or 10.<br class="">     >      ><br class="">     >      >     On 6/6/2018 4:07 PM, John Carlson wrote:<br class="">     >      >      > Full script under OpenJDK 8,  Ubuntu on Windows 10.  Log attached.  The readAllBytes issue will be fixed by Java 9.  Is there a way to set your ant<br class="">     >      >      > JDK to JDK 9 inside NetBeans?  Wondering.<br class="">     >      >      ><br class="">     >      >      > John<br class="">     >      >      ><br class="">     >      >      > $ cd /mnt/c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">www.web3d.org/x3d/stylesheets/java/</a><<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>><br class="">     >      >      ><br class="">     >      >      > $ javac -cp lib/javax.json-api-1.0.jar src/net/coderextreme/X3DJSONLD.java<br class="">     >      >      ><br class="">     >      >      > $ cp src/net/coderextreme/X3DJSONLD.class classes/net/coderextreme/<br class="">     >      >      ><br class="">     >      >      > # use ; instead of : in command prompt and git bash<br class="">     >      >      ><br class="">     >      >      > $ jjs -J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar:classes nashorn/examples/Json.js<br class="">     >      >      ><br class="">     >      >      > $ diff -w nashorn/examples/HelloWorldProgramOutput.Java.x3d nashorn/examples/Json.x3d<br class="">     >      >      ><br class="">     >      >      > You should be able to duplicate the error with JDK 8 this way.  Command prompt will differ slightly.<br class="">     >      >      ><br class="">     >      >      > John<br class="">     >      >      ><br class="">     >      >      > Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" class="">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br class="">     >      >      ><br class="">     >      >      > *From: *John Carlson <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>>>><br class="">     >      >      > *Sent: *Wednesday, June 6, 2018 6:06 PM<br class="">     >      >      > *To: *Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>>><br class="">     >      >      > *Cc: *<a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>>><br class="">     >      >      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt and DOMX3DLoaderObjecttesting:anotherClassCastException<br class="">     >      >      ><br class="">     >      >      > Under OpenJDK 8 on Ubuntu under windows, the jjs command is:<br class="">     >      >      ><br class="">     >      >      > $ jjs -J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar:classes nashorn/examples/Json.js<br class="">     >      >      ><br class="">     >      >      > And the cd command is:<br class="">     >      >      ><br class="">     >      >      > $ cd /mnt/c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">www.web3d.org/x3d/stylesheets/java/</a><<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>><br class="">     >      >      ><br class="">     >      >      > Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" class="">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br class="">     >      >      ><br class="">     >      >      > *From: *John Carlson <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>>>><br class="">     >      >      > *Sent: *Wednesday, June 6, 2018 5:37 PM<br class="">     >      >      > *To: *Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>>><br class="">     >      >      > *Cc: *<a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>>><br class="">     >      >      > *Subject: *RE: X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObjecttesting:anotherClassCastException<br class="">     >      >      ><br class="">     >      >      > Try stepping through with these commands at command prompt or similar (you’ll have to use diff and cp from Ubuntu, now available on Windows or similar commands under DOS)<br class="">     >      >      ><br class="">     >      >      > $ cd /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">www.web3d.org/x3d/stylesheets/java/</a><<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/" class="">http://www.web3d.org/x3d/stylesheets/java/</a>><br class="">     >      >      ><br class="">     >      >      > $ javac -cp lib/javax.json-api-1.0.jar src/net/coderextreme/X3DJSONLD.java<br class="">     >      >      ><br class="">     >      >      > $ cp src/net/coderextreme/X3DJSONLD.class classes/net/coderextreme/<br class="">     >      >      ><br class="">     >      >      > $ jjs -cp "jars/X3DJSAIL.3.3.full.jar;classes" nashorn/examples/Json.js    # you may have to use the Java 8 way of specifying the classpath. See build.xml<br class="">     >      >      ><br class="">     >      >      > $ diff -w nashorn/examples/HelloWorldProgramOutput.Java.x3d nashorn/examples/Json.x3d<br class="">     >      >      ><br class="">     >      >      > 32a33,35<br class="">     >      >      ><br class="">     >      >      >  >         <meta name='translated' content='27 May 2018'/><br class="">     >      >      ><br class="">     >      >      >  >         <meta name='generator' content='X3dToJson.xslt,<span class="Apple-converted-space"> </span><a href="http://www.web3d.org/x3d/stylesheets/X3dToJson.html'/" class="">http://www.web3d.org/x3d/stylesheets/X3dToJson.html'/</a>><br class="">     >      >      ><br class="">     >      >      >  >         <meta name='reference' content='X3D JSON encoding:<span class="Apple-converted-space"> </span><a href="http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding'/" class="">http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding'/</a>><br class="">     >      >      ><br class="">     >      >      > 35,38c38<br class="">     >      >      ><br class="">     >      >      > <         <ViewpointGroup description='Available viewpoints'><br class="">     >      >      ><br class="">     >      >      > <             <Viewpoint DEF='DefaultView' description='Hello X3DJSAIL'/><br class="">     >      >      ><br class="">     >      >      > <             <Viewpoint DEF='TopDownView' description='top-down view from above' orientation='1 0 0 -1.570796' position='0 100 0'/><br class="">     >      >      ><br class="">     >      >      > <         </ViewpointGroup><br class="">     >      >      ><br class="">     >      >      > ---<br class="">     >      >      ><br class="">     >      >      >  >         <ViewpointGroup description='Available viewpoints'/><br class="">     >      >      ><br class="">     >      >      > You will see the missing Viewpoint’s (children of ViewpointGroup) as above.  Also jjs will generate significant output.<br class="">     >      >      ><br class="">     >      >      > I can’t connect through svn, so I may be out of date.<br class="">     >      >      ><br class="">     >      >      > John<br class="">     >      >      ><br class="">     >      >      > Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" class="">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br class="">     >      >      ><br class="">     >      >      > *From: *Don Brutzman <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>>><br class="">     >      >      > *Sent: *Wednesday, June 6, 2018 9:41 AM<br class="">     >      >      > *To: *John Carlson <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>> <<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a><span class="Apple-converted-space"> </span><<a href="mailto:yottzumm@gmail.com" class="">mailto:yottzumm@gmail.com</a>>>>><br class="">     >      >      > *Cc: *<a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>> <<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a><span class="Apple-converted-space"> </span><<a href="mailto:x3d-public@web3d.org" class="">mailto:x3d-public@web3d.org</a>>>>><br class="">     >      >      > *Subject: *Re: X3DJSAIL, X3dToJava.xslt and DOM X3DLoaderObject testing:anotherClassCastException<br class="">     >      >      ><br class="">     >      >      > 1. Hi John, finally getting back to this one.<br class="">     >      >      ><br class="">     >      >      > On 4/30/2018 3:15 PM, John Carlson wrote:<br class="">     >      >      ><br class="">     >      >      >  > Previously reported problem, now assigned to the X3DLoaderObject, I believe.<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  > No Viewpoint children in X3D or JSON output.<br class="">     >      >      ><br class="">     >      >      > Not sure what that means?  Viewpoint node typically does not have any children, except perhaps for a Metadata* node or an IS/connect.<br class="">     >      >      ><br class="">     >      >      >  > Is a problem with X3DLoaderObject, looks like another class cast exception.  X3DJSONLD was eliminated from the problem by printing out the DOM object, and verifying the Viewpoint objects were there.   See x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js" class="">www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js</a><<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js" class="">http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js" class="">http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js" class="">http://www.web3d.org/x3d/stylesheets/java/nashorn/examples/Quotes.js</a>>.<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  > Can be regenerated by running `ant test.nashorn` in x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java" class="">www.web3d.org/x3d/stylesheets/java</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/x3d/stylesheets/java" class="">http://www.web3d.org/x3d/stylesheets/java</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java" class="">http://www.web3d.org/x3d/stylesheets/java</a>> <<a href="http://www.web3d.org/x3d/stylesheets/java" class="">http://www.web3d.org/x3d/stylesheets/java</a>><br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  > See output in nashorn/examples/Json.{json,x3d}<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  > John<br class="">     >      >      ><br class="">     >      >      > OK have recently updated to Java JDK 1.8.0_172 and adjusted PATH to confirm jjs is running OK.<br class="">     >      >      ><br class="">     >      >      > Have also synchronized X3DJSAIL sudirectory nashorn/ and contents with subversion.<br class="">     >      >      ><br class="">     >      >      > I get the following outputs when running test.nashorn build target:<br class="">     >      >      ><br class="">     >      >      > ============================================================<br class="">     >      >      ><br class="">     >      >      > ant -f E:\\x3d-code\\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\\x3d\\stylesheets\\java test.nashorn<br class="">     >      >      ><br class="">     >      >      > test.nashorn:<br class="">     >      >      ><br class="">     >      >      > ===========================================<br class="">     >      >      ><br class="">     >      >      > ant nashorn/build.xml test.nashorn<br class="">     >      >      ><br class="">     >      >      > X3D Nashorn SAI Library.test.nashorn:<br class="">     >      >      ><br class="">     >      >      > Compile:<br class="">     >      >      ><br class="">     >      >      > Compiling 1 source file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\classes<br class="">     >      >      ><br class="">     >      >      > Compiling 1 source file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\classes<br class="">     >      >      ><br class="">     >      >      > Copy:<br class="">     >      >      ><br class="">     >      >      > Copying 1 file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples<br class="">     >      >      ><br class="">     >      >      > Copying E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d<br class="">     >      >      ><br class="">     >      >      > Copying 1 file to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples<br class="">     >      >      ><br class="">     >      >      > Copying E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json<br class="">     >      >      ><br class="">     >      >      > Run:<br class="">     >      >      ><br class="">     >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">     >      >      ><br class="">     >      >      > parameter: "-tojs" for conversion to X3DJSONLD JavaScript source<br class="">     >      >      ><br class="">     >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root nashorn/examples/HelloWorldProgramOutput.Nashorn<br class="">     >      >      ><br class="">     >      >      > convert to JS JavaScript:<br class="">     >      >      ><br class="">     >      >      > Warning: toFileJavaScript() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.js<br class="">     >      >      ><br class="">     >      >      > Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">     >      >      ><br class="">     >      >      > Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">     >      >      ><br class="">     >      >      > TypeError: input.readAllBytes is not a function<br class="">     >      >      ><br class="">     >      >      > Error: Cannot read file [E:\x3d-code\<a href="http://www.web3d.org/" class="">www.web3d.org</a><span class="Apple-converted-space"> </span><<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>> <<a href="http://www.web3d.org/" class="">http://www.web3d.org</a>>\x3d\stylesheets\java\nashorn\node_modules\xmldom\package.json]:<br class="">     >      >      ><br class="">     >      >      > [Error] TODO problem handling local exception within CommandLine, exiting<br class="">     >      >      ><br class="">     >      >      > org.web3d.x3d.sai.X3DException: ScriptException when processing fileName nashorn\examples\HelloWorldProgramOutput.Nashorn.js.intermediate.js, unable to save result: javax.script.ScriptException: Error: Cannot load JSON file in nashorn/jvm-npm.js at line number 216 at column number 8<br class="">     >      >      ><br class="">     >      >      >                  at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1662)<br class="">     >      >      ><br class="">     >      >      >                  at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:628)<br class="">     >      >      ><br class="">     >      >      >                  at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)<br class="">     >      >      ><br class="">     >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">     >      >      ><br class="">     >      >      > parameter: "-toJSON" for conversion to JSON encoding<br class="">     >      >      ><br class="">     >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Java.json" for result file name root nashorn/examples/HelloWorldProgramOutput.Java<br class="">     >      >      ><br class="">     >      >      > convert to JSON:<br class="">     >      >      ><br class="">     >      >      > Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Java.json<br class="">     >      >      ><br class="">     >      >      > Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">     >      >      ><br class="">     >      >      > Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br class="">     >      >      ><br class="">     >      >      > file conversion successful: HelloWorldProgramOutput.Java.json (39749 bytes)<br class="">     >      >      ><br class="">     >      >      > parameter: source file HelloWorldProgramOutput.x3d filesize 20956 bytes, parsed using Document Object Model (DOM) X3DLoader<br class="">     >      >      ><br class="">     >      >      > parameter: "-toX3D" for conversion to X3D encoding<br class="">     >      >      ><br class="">     >      >      > parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Java.x3d" for result file name root nashorn/examples/HelloWorldProgramOutput.Java<br class="">     >      >      ><br class="">     >      >      > convert to X3D:<br class="">     >      >      ><br class="">     >      >      > Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Java.x3d<br class="">     >      >      ><br class="">     >      >      > file conversion successful: HelloWorldProgramOutput.Java.x3d (20956 bytes)<br class="">     >      >      ><br class="">     >      >      > ===========================================<br class="">     >      >      ><br class="">     >      >      > ============================================================<br class="">     >      >      ><br class="">     >      >      > As you can see, the exception is in nashorn/jvm-npm.js:<br class="">     >      >      ><br class="">     >      >      >                  TypeError: input.readAllBytes is not a function<br class="">     >      >      ><br class="">     >      >      > Header in that file indicates that you have modified it.<br class="">     >      >      ><br class="">     >      >      > Specific javascript code block of interest:<br class="">     >      >      ><br class="">     >      >      >     function readFile (filename, core) {<br class="">     >      >      ><br class="">     >      >      >       var input;<br class="">     >      >      ><br class="">     >      >      >       try {<br class="">     >      >      ><br class="">     >      >      >         if (core) {<br class="">     >      >      ><br class="">     >      >      >           var classloader = java.lang.Thread.currentThread().getContextClassLoader();<br class="">     >      >      ><br class="">     >      >      >           input = classloader.getResourceAsStream(filename);<br class="">     >      >      ><br class="">     >      >      >         } else {<br class="">     >      >      ><br class="">     >      >      >                  input = new java.io.FileInputStream(filename);<br class="">     >      >      ><br class="">     >      >      >         }<br class="">     >      >      ><br class="">     >      >      >         return new java.lang.String(input.readAllBytes());<br class="">     >      >      ><br class="">     >      >      >       } catch (e) {<br class="">     >      >      ><br class="">     >      >      >         System.err.println(e);<br class="">     >      >      ><br class="">     >      >      >         throw new ModuleError('Cannot read file [' + filename + ']: ', 'IO_ERROR', e);<br class="">     >      >      ><br class="">     >      >      >       }<br class="">     >      >      ><br class="">     >      >      >     }<br class="">     >      >      ><br class="">     >      >      > JDK 8 Javadoc for java.io.FileInputStream does not provide a "readAllBytes()" method.  (Nor does JDK 1.9; however I am currently holding at 1.8 to stay compatible with Netbeans 8.)<br class="">     >      >      ><br class="">     >      >      ><span class="Apple-converted-space"> </span><a href="https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html" class="">https://docs.oracle.com/javase/8/docs/api/java/io/FileInputStream.html</a><br class="">     >      >      ><br class="">     >      >      > So it looks like you need another method.<br class="">     >      >      ><br class="">     >      >      > A search for "java.io.FileInputStream readAllBytes" provides a number of hits.  For example:<br class="">     >      >      ><br class="">     >      >      >                  File to byte[] in Java<br class="">     >      >      ><br class="">     >      >      ><span class="Apple-converted-space"> </span><a href="https://stackoverflow.com/questions/858980/file-to-byte-in-java" class="">https://stackoverflow.com/questions/858980/file-to-byte-in-java</a><br class="">     >      >      ><br class="">     >      >      > 2. Continuing with your prior error console also appears fruitful:<br class="">     >      >      ><br class="">     >      >      >  >       [exec] [X3DLoaderObject error] Incorrectly handled object construction, current elementObject=ViewpointGroup (ViewpointGroup), child=Viewpoint, java.lang.ClassCastException: org.web3d.x3d.jsail.Navigation.ViewpointGroupObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec] java.lang.ClassCastException: org.web3d.x3d.jsail.Navigation.ViewpointGroupObject cannot be cast to org.web3d.x3d.sai.Grouping.X3DGroupingNode<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:1146)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:542)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:542)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:430)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at org.web3d.x3d.jsail.X3DLoaderObject.toX3dObjectTree(X3DLoaderObject.java:399)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$372$Json$cu1$restOf.:program(nashorn/examples/Json.js:15)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)<br class="">     >      >      ><br class="">     >      >      >  ><br class="">     >      >      ><br class="">     >      >      >  >       [exec]     at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)<br class="">     >      >      ><br class="">     >      >      > Looks like it was trying to treat ViewpointGroup like a X3DGroupingNode - but it is not.  ViewpointGroup is not a X3DGroupingNode node, and can only contain a Metadata* node, Viewpoint/OrthoViewpoint/GeoViewpoint and other ViewpointGroup nodes.<br class="">     >      >      ><br class="">     >      >      > This might have been fixed already as part of the many DOM loader improvements performed; not seeing that error in my console.  Worth retesting if you can address the readAllBytes issue.<br class="">     >      >      ><br class="">     >      >      > I've added a warning to X3D tooltips to clarify that.<br class="">     >      >      ><br class="">     >      >      > Hope next round of improvement/testing can sort this one out fully.<br class="">     >      >      ><br class="">     >      >      > all the best, Don<br class="">     >      >      ><br class="">     >      >      > --<br class="">     >      >      ><br class="">     >      >      > Don Brutzman  Naval Postgraduate School, Code USW/Br<span class="Apple-converted-space"> </span><a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>><br class="">     >      >      ><br class="">     >      >      > Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br class="">     >      >      ><br class="">     >      >      > X3D graphics, virtual worlds, navy robotics<span class="Apple-converted-space"> </span><a href="http://faculty.nps.edu/brutzman" class="">http://faculty.nps.edu/brutzman</a><br class="">    <span class="Apple-converted-space"> </span>>      >      ><br class="">    <span class="Apple-converted-space"> </span>>      ><br class="">     >      ><br class="">     >      >     all the best, Don<br class="">     >      >     --<br class="">     >      >     Don Brutzman  Naval Postgraduate School, Code USW/Br<span class="Apple-converted-space"> </span><a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a><<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>>><br class="">    <span class="Apple-converted-space"> </span>>      >     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br class="">    <span class="Apple-converted-space"> </span>>      >     X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" class="">http://faculty.nps.edu/brutzman</a><br class="">    <span class="Apple-converted-space"> </span>>      ><br class="">    <span class="Apple-converted-space"> </span>><br class="">    <span class="Apple-converted-space"> </span>><br class="">    <span class="Apple-converted-space"> </span>>     all the best, Don<br class="">    <span class="Apple-converted-space"> </span>>     --<br class="">    <span class="Apple-converted-space"> </span>>     Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>>><br class="">    <span class="Apple-converted-space"> </span>>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br class="">    <span class="Apple-converted-space"> </span>>     X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" class="">http://faculty.nps.edu/brutzman</a><br class="">    <span class="Apple-converted-space"> </span>><br class=""><br class=""><br class="">   <span class="Apple-converted-space"> </span>all the best, Don<br class="">   <span class="Apple-converted-space"> </span>--     Don Brutzman  Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" class="">brutzman@nps.edu</a> <<a href="mailto:brutzman@nps.edu" class="">mailto:brutzman@nps.edu</a>><br class="">   <span class="Apple-converted-space"> </span>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br class="">   <span class="Apple-converted-space"> </span>X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" class="">http://faculty.nps.edu/brutzman</a><br class=""><br class=""></blockquote>all the best, Don<br class=""></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">all the best, Don</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">--<span class="Apple-converted-space"> </span></span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Don Brutzman  Naval Postgraduate School, Code USW/Br       </span><a href="mailto:brutzman@nps.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">brutzman@nps.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">X3D graphics, virtual worlds, navy robotics<span class="Apple-converted-space"> </span></span><a href="http://faculty.nps.edu/brutzman" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://faculty.nps.edu/brutzman</a></div></blockquote></div><br class=""></body></html>