<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Here’s a patch to the X3DJSAIL stylesheet and java/build.xml.   Attached.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Sunday, January 28, 2018 1:14 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br><b>Subject: </b>Re: Problems generating files using build.xml target test.nashorn</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 1/26/2018 2:13 AM, John Carlson wrote:</p><p class=MsoNormal>> This works instead of a script in build.xml:</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <exec executable="jjs"></p><p class=MsoNormal>> </p><p class=MsoNormal>>                          <arg value="-J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                          <arg value="nashorn/examples/HelloWorldProgramOutput.Nashorn.js"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                  </exec></p><p class=MsoNormal>> </p><p class=MsoNormal>> Everything is checked in.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Confirming yes, it is there and apparently working OK.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Shall I add test.nashorn to the smoke tests?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here is output that I am currently seeing.  Still getting errors regarding nashorn/jvm-npm.js input.readAllBytes and package.json:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>========================================================================</p><p class=MsoNormal>ant -f C:\\x3d-code\\www.web3d.org\\x3d\\stylesheets\\java test.nashorn</p><p class=MsoNormal>test.nashorn:</p><p class=MsoNormal>Compile:</p><p class=MsoNormal>Compiling 2 source files to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\classes</p><p class=MsoNormal>Copy:</p><p class=MsoNormal>Copying 1 file to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples</p><p class=MsoNormal>Copying C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.x3d</p><p class=MsoNormal>Copying 1 file to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples</p><p class=MsoNormal>Copying C:\x3d-code\www.web3d.org\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\examples\HelloWorldProgramOutput.json</p><p class=MsoNormal>Run:</p><p class=MsoNormal>parameter: source file HelloWorldProgramOutput.x3d filesize 20771 bytes</p><p class=MsoNormal>parameter: "-toJS" for conversion to X3DJSONLD JavaScript source</p><p class=MsoNormal>parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root nashorn/examples/HelloWorldProgramOutput.Nashorn</p><p class=MsoNormal>convert to JS JavaScript:</p><p class=MsoNormal>Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...</p><p class=MsoNormal>Warning: toFileJavaScript() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.js</p><p class=MsoNormal>Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode</p><p class=MsoNormal>Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode</p><p class=MsoNormal>TypeError: input.readAllBytes is not a function</p><p class=MsoNormal>Error: Cannot read file [C:\x3d-code\www.web3d.org\x3d\stylesheets\java\nashorn\node_modules\xmldom\package.json]:</p><p class=MsoNormal>[Error] TODO problem handling local exception within CommandLine, exiting</p><p class=MsoNormal>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</p><p class=MsoNormal>                at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1602)</p><p class=MsoNormal>                at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:557)</p><p class=MsoNormal>                at org.web3d.x3d.jsail.Core.X3DObject.handleArguments(X3DObject.java:2572)</p><p class=MsoNormal>                at HelloWorldProgramOutput.main(HelloWorldProgramOutput.java:400)</p><p class=MsoNormal>parameter: source file HelloWorldProgramOutput.x3d filesize 20771 bytes</p><p class=MsoNormal>parameter: "-toJSON" for conversion to JSON encoding</p><p class=MsoNormal>parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Nashorn.json" for result file name root nashorn/examples/HelloWorldProgramOutput.Nashorn</p><p class=MsoNormal>convert to JSON:</p><p class=MsoNormal>Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.json does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...</p><p class=MsoNormal>Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.json</p><p class=MsoNormal>Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode</p><p class=MsoNormal>Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode</p><p class=MsoNormal>file conversion successful: HelloWorldProgramOutput.Nashorn.json (39182 bytes)</p><p class=MsoNormal>parameter: source file HelloWorldProgramOutput.x3d filesize 20771 bytes</p><p class=MsoNormal>parameter: "-toX3D" for conversion to X3D encoding</p><p class=MsoNormal>parameter: "-toFile" "nashorn/examples/HelloWorldProgramOutput.Nashorn.x3d" for result file name root nashorn/examples/HelloWorldProgramOutput.Nashorn</p><p class=MsoNormal>convert to X3D:</p><p class=MsoNormal>Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.x3d does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...</p><p class=MsoNormal>Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.x3d</p><p class=MsoNormal>file conversion successful: HelloWorldProgramOutput.Nashorn.x3d (20771 bytes)</p><p class=MsoNormal>===========================================</p><p class=MsoNormal>HelloWorldProgramOutput.Nashorn.x3d</p><p class=MsoNormal>1 file(s) have been successfully validated.</p><p class=MsoNormal>1 file(s) have been successfully validated.</p><p class=MsoNormal>matches HelloWorldProgramOutput.x3d: true</p><p class=MsoNormal>===========================================</p><p class=MsoNormal>script:</p><p class=MsoNormal>nashorn/examples/HelloWorldProgramOutput.Nashorn.js:1 TypeError: Cannot load script from node/X3Dautoclass.js</p><p class=MsoNormal>Result: 102</p><p class=MsoNormal>BUILD SUCCESSFUL (total time: 12 seconds)</p><p class=MsoNormal>========================================================================</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>p.s. this warning is overzealous, will try to tune that better:</p><p class=MsoNormal>"Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js does not meet suggested X3D naming conventions."</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu</p><p class=MsoNormal>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>