<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 24, 2018 at 2:05 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">made your one-line tweak on other email.  checked in, uploading<br>
<br>
On 7/23/2018 5:48 AM, John Carlson wrote:<br>
> Not sure about the first error, looks like you’ve got some changes you haven’t checked in that need to be backed out?<br>
<br>
everything is checked in.  you can look at .jar or subversion to confirm presence or absence of any files you are expecting.<br>
<br>
For the others, you’ll probably need to create the ../nashorn/examples folder, if not already created.  Suggestions are welcome for fixes to output folders (such that scripts will have correct output folders).<br>
> <br>
> I currently have several folders that there’s an examples folder in:<br>
> <br>
> ./stylesheets/java/nashorn<br>
> <br>
> ./stylesheets/java/nashorn/nashorn<br>
> <br>
> ./stylesheets/nashorn</blockquote><div dir="auto"><br></div><div dir="auto">And the examples folders below them.   Hmm</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
those all seem to be present OK.<br>
<br>
> I didn’t know what else to do, but I didn’t think very hard either.  It’s like we need the equivalent of classpath for output.   Hmm.<br>
> <br>
> John<br>
<br>
sfor some reason X3dToES5.xslt keeps getting deleted (cleaned) and later restored when i do a version control update... perhaps that is the problem?</blockquote><div dir="auto"><br></div><div dir="auto">Same on my end.  I am not sure why it’s happening (virus checker?).</div><div dir="auto"><br></div><div dir="auto">I’m on vacation for a week, so I won’t have much to do til Saturday.</div><div dir="auto"><br></div><div dir="auto">John</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" rel="noreferrer" target="_blank">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br>
> <br>
> *From: *Don Brutzman <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
> *Sent: *Monday, July 23, 2018 1:51 AM<br>
> *To: *John Carlson <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>
> *Cc: *X3D Graphics public mailing list <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> *Subject: *Re: Following patch to CreateX3dSceneAccessInterfaceJava.xslt(X3DJSAIL) fixed some issues with test.nashorn (but not all of them)<br>
> <br>
> I applied these patch changes manually, hopefully OK.<br>
> <br>
> Also refactored relative directory paths in ant build.xml (for stylesheets and X3DJSAIL) from "value" to "location" so that they remained stable when one build was invoked from another.  Changes checked in, uploads in progress.<br>
> <br>
> nashorn output in HelloWorldProgramOutputLog.txt looks better.  some bugs remain on my system:<br>
> <br>
> ===========================================<br>
> <br>
> ant antfile=java/nashorn/build.xml target=test.nashorn (direct invocation)<br>
> <br>
> X3D Nashorn SAI Library.test.nashorn:<br>
> <br>
> Compile:<br>
> <br>
> Compiling 2 source files to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\java\classes<br>
> <br>
> Compiling 2 source files to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\java\classes<br>
> <br>
> Copy:<br>
> <br>
> Copying 1 file to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn\examples<br>
> <br>
> Copying C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.x3d to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn\examples\HelloWorldProgramOutput.x3d<br>
> <br>
> Copying 1 file to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn\examples<br>
> <br>
> Copying C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\java\examples\HelloWorldProgramOutput.json to C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn\examples\HelloWorldProgramOutput.json<br>
> <br>
> Run:<br>
> <br>
> parameter: source file HelloWorldProgramOutput.x3d filesize 21210 bytes, parsed using Document Object Model (DOM) X3DLoader<br>
> <br>
> parameter: "-tojs" for conversion to X3DJSONLD JavaScript source<br>
> <br>
> parameter: "-toFile" "C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Nashorn.js" for result file name root C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Nashorn<br>
> <br>
> convert to JS JavaScript:<br>
> <br>
> Warning: toFileJavaScript() is overwriting prior file C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Nashorn.js<br>
> <br>
> Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br>
> <br>
> Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br>
> <br>
> [Error] TODO problem handling local exception within CommandLine, exiting<br>
> <br>
> org.web3d.x3d.sai.X3DException: ScriptException when processing fileName C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn\examples\HelloWorldProgramOutput.Nashorn.js.intermediate.js, unable to save result: javax.script.ScriptException: TypeError: Cannot load script from classpath:C:=-<a href="http://codewww.web3d.org" rel="noreferrer" target="_blank">codewww.web3d.org</a>=stylesheets<br>
> <br>
> ashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js in <eval> at line number 1<br>
> <br>
>                  at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1666)<br>
> <br>
>                  at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:643)<br>
> <br>
>                  at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)<br>
> <br>
> parameter: source file HelloWorldProgramOutput.x3d filesize 21210 bytes, parsed using Document Object Model (DOM) X3DLoader<br>
> <br>
> parameter: "-toJSON" for conversion to JSON encoding<br>
> <br>
> parameter: "-toFile" "C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java.json" for result file name root C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java<br>
> <br>
> convert to JSON:<br>
> <br>
> Warning: toFileStylesheetConversion(X3dToJson.xslt) is overwriting prior file C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java.json<br>
> <br>
> Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br>
> <br>
> Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode<br>
> <br>
> file conversion successful: HelloWorldProgramOutput.Java.json (40058 bytes)<br>
> <br>
> parameter: source file HelloWorldProgramOutput.x3d filesize 21210 bytes, parsed using Document Object Model (DOM) X3DLoader<br>
> <br>
> parameter: "-toX3D" for conversion to X3D encoding<br>
> <br>
> parameter: "-toFile" "C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java.x3d" for result file name root C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java<br>
> <br>
> convert to X3D:<br>
> <br>
> Warning: toFileX3D() is overwriting prior file C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Java.x3d<br>
> <br>
> file conversion successful: HelloWorldProgramOutput.Java.x3d (21210 bytes)<br>
> <br>
> ===========================================<br>
> <br>
> HelloWorldProgramOutput.Java.x3d<br>
> <br>
> 1 file(s) have been successfully validated.<br>
> <br>
> 1 file(s) have been successfully validated.<br>
> <br>
> matches HelloWorldProgramOutput.x3d: true<br>
> <br>
> ===========================================<br>
> <br>
> ===========================================<br>
> <br>
> HelloWorldProgramOutput.Java.json<br>
> <br>
> matches HelloWorldProgramOutput.json: true<br>
> <br>
> ===========================================<br>
> <br>
> script:<br>
> <br>
> SFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F@5ddcc487<br>
> <br>
> MFColorRGBAObject.initialize() problem: failed to match default value DEFAULT_VALUE [F@36cda2c2<br>
> <br>
> SFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I@3403e2ac<br>
> <br>
> MFImageObject.initialize() problem: failed to match default value DEFAULT_VALUE [I@54504ecd<br>
> <br>
> java.nio.file.NoSuchFileException: ..\nashorn\examples\HelloWorldProgramOutput.Nashorn.js.new.x3d<br>
> <br>
>                  at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)<br>
> <br>
>                  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)<br>
> <br>
>                  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)<br>
> <br>
>                  at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:230)<br>
> <br>
>                  at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)<br>
> <br>
>                  at java.nio.file.Files.newOutputStream(Files.java:216)<br>
> <br>
>                  at java.nio.file.Files.newBufferedWriter(Files.java:2860)<br>
> <br>
>                  at org.web3d.x3d.jsail.Core.X3DObject.toFileX3D(X3DObject.java:686)<br>
> <br>
>                  at jdk.nashorn.internal.scripts.Script$HelloWorldProgramOutput_Nashorn.:program(C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Nashorn.js:258)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.apply(Shell.java:471)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.runScripts(Shell.java:400)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.run(Shell.java:179)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.main(Shell.java:143)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.main(Shell.java:119)<br>
> <br>
> Exception in thread "main" org.web3d.x3d.sai.X3DException: IOException for fileName ../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d, unable to save file: java.nio.file.NoSuchFileException: ..\nashorn\examples\HelloWorldProgramOutput.Nashorn.js.new.x3d<br>
> <br>
>                  at org.web3d.x3d.jsail.Core.X3DObject.toFileX3D(X3DObject.java:694)<br>
> <br>
>                  at jdk.nashorn.internal.scripts.Script$HelloWorldProgramOutput_Nashorn.:program(C:\x3d-code\<a href="http://www.web3d.org" rel="noreferrer" target="_blank">www.web3d.org</a>\x3d\stylesheets\nashorn/examples/HelloWorldProgramOutput.Nashorn.js:258)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)<br>
> <br>
>                  at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.apply(Shell.java:471)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.runScripts(Shell.java:400)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.run(Shell.java:179)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.main(Shell.java:143)<br>
> <br>
>                  at jdk.nashorn.tools.Shell.main(Shell.java:119)<br>
> <br>
> Result: 1<br>
> <br>
> ===========================================<br>
> <br>
> On 7/17/2018 3:06 AM, John Carlson wrote:<br>
> <br>
>  > svn diff CreateX3dSceneAccessInterfaceJava.xslt<br>
> <br>
>  ><br>
> <br>
>  > Index: CreateX3dSceneAccessInterfaceJava.xslt<br>
> <br>
>  ><br>
> <br>
>  > ===================================================================<br>
> <br>
>  ><br>
> <br>
>  > --- CreateX3dSceneAccessInterfaceJava.xslt      (revision 27088)<br>
> <br>
>  ><br>
> <br>
>  > +++ CreateX3dSceneAccessInterfaceJava.xslt      (working copy)<br>
> <br>
>  ><br>
> <br>
>  > @@ -3907,9 +3907,9 @@<br>
> <br>
>  ><br>
> <br>
>  >                                          // patches by John Carlson<br>
> <br>
>  ><br>
> <br>
>  >                       bufferedWriter = Files.newBufferedWriter(intermediateJSFilePath, charset);<br>
> <br>
>  ><br>
> <br>
>  >                                          String nashornFolder = "nashorn";<br>
> <br>
>  ><br>
> <br>
>  > -                                       String tmpStr = "load('"+nashornFolder+"/jvm-npm.js');\n";<br>
> <br>
>  ><br>
> <br>
>  > +                                       String tmpStr = "load('classpath:"+nashornFolder+"/jvm-npm.js');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  > -                                       tmpStr = "load('"+nashornFolder+"/repeatPolyfill.js');\n";<br>
> <br>
>  ><br>
> <br>
>  > +                                       tmpStr = "load('classpath:"+nashornFolder+"/repeatPolyfill.js');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  >                                          tmpStr = "var xmldom = require('"+nashornFolder+"/node_modules/xmldom');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  > @@ -3933,9 +3933,9 @@<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  >                                          tmpStr = "var fieldTypes = require('"+nashornFolder+"/node/fieldTypes.js');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  > -                                       tmpStr = "load('"+nashornFolder+"/node/X3DJSONLD.js');\n";<br>
> <br>
>  ><br>
> <br>
>  > +                                       tmpStr = "load('classpath:"+nashornFolder+"/node/X3DJSONLD.js');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  > -                                       tmpStr = "load('"+nashornFolder+"/node/JavaScriptSerializer.js');\n";<br>
> <br>
>  ><br>
> <br>
>  > +                                       tmpStr = "load('classpath:"+nashornFolder+"/node/JavaScriptSerializer.js');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  >                                          tmpStr = "var child = CreateElement('X3D');\n";<br>
> <br>
>  ><br>
> <br>
>  >                                          bufferedWriter.write(tmpStr, 0, tmpStr.length());<br>
> <br>
>  ><br>
> <br>
>  > @@ -3963,7 +3963,7 @@<br>
> <br>
>  ><br>
> <br>
>  >                   }<br>
> <br>
>  ><br>
> <br>
>  >                   try {<br>
> <br>
>  ><br>
> <br>
>  >                                          ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");<br>
> <br>
>  ><br>
> <br>
>  > -                                        engine.eval("load('"+intermediateJSFileName+"');");<br>
> <br>
>  ><br>
> <br>
>  > +                                        engine.eval("load('classpath:"+intermediateJSFileName+"');");<br>
> <br>
>  ><br>
> <br>
>  >                                          if (ConfigurationProperties.isDeleteIntermediateFiles()) // clean up when done<br>
> <br>
>  ><br>
> <br>
>  >                                                          intermediateJSFilePath.toFile().deleteOnExit();<br>
> <br>
>  ><br>
> <br>
>  >                                          engine.eval("print('Hello World!');");<br>
> <br>
>  ><br>
> <br>
> all the best, Don<br>
> <br>
> -- <br>
> <br>
> Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
> <br>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
> <br>
> X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> <br>
<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
</blockquote></div></div>