<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>Don, can you try to fix this final problem with the java/nashoirn/build.xml test.nashorn build? Thanks!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I discovered that you can use classpath: to load JavaScripts from the classpath in Nashorn, which fixed quite a few errors</p><p class=MsoNormal>John</p><p class=MsoNormal> [java] 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 classpath:../nashorn/examples/HelloWorldProgramOutput.Nashorn.js.intermediate.js in <eval> at line number 1</p><p class=MsoNormal> [java] at org.web3d.x3d.jsail.Core.X3DObject.toFileJavaScript(X3DObject.java:1666)</p><p class=MsoNormal> [java] at org.web3d.x3d.jsail.CommandLine.run(CommandLine.java:628)</p><p class=MsoNormal> [java] at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:163)</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here is my current patch, I think the problem is with the last difff, but I don’t know how to fix it right:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>svn diff CreateX3dSceneAccessInterfaceJava.xslt</p><p class=MsoNormal>Index: CreateX3dSceneAccessInterfaceJava.xslt</p><p class=MsoNormal>===================================================================</p><p class=MsoNormal>--- CreateX3dSceneAccessInterfaceJava.xslt (revision 27088)</p><p class=MsoNormal>+++ CreateX3dSceneAccessInterfaceJava.xslt (working copy)</p><p class=MsoNormal>@@ -3907,9 +3907,9 @@</p><p class=MsoNormal> // patches by John Carlson</p><p class=MsoNormal> bufferedWriter = Files.newBufferedWriter(intermediateJSFilePath, charset);</p><p class=MsoNormal> String nashornFolder = "nashorn";</p><p class=MsoNormal>- String tmpStr = "load('"+nashornFolder+"/jvm-npm.js');\n";</p><p class=MsoNormal>+ String tmpStr = "load('classpath:"+nashornFolder+"/jvm-npm.js');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal>- tmpStr = "load('"+nashornFolder+"/repeatPolyfill.js');\n";</p><p class=MsoNormal>+ tmpStr = "load('classpath:"+nashornFolder+"/repeatPolyfill.js');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal> tmpStr = "var xmldom = require('"+nashornFolder+"/node_modules/xmldom');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal>@@ -3933,9 +3933,9 @@</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal> tmpStr = "var fieldTypes = require('"+nashornFolder+"/node/fieldTypes.js');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal>- tmpStr = "load('"+nashornFolder+"/node/X3DJSONLD.js');\n";</p><p class=MsoNormal>+ tmpStr = "load('classpath:"+nashornFolder+"/node/X3DJSONLD.js');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal>- tmpStr = "load('"+nashornFolder+"/node/JavaScriptSerializer.js');\n";</p><p class=MsoNormal>+ tmpStr = "load('classpath:"+nashornFolder+"/node/JavaScriptSerializer.js');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal> tmpStr = "var child = CreateElement('X3D');\n";</p><p class=MsoNormal> bufferedWriter.write(tmpStr, 0, tmpStr.length());</p><p class=MsoNormal>@@ -3963,7 +3963,7 @@</p><p class=MsoNormal> }</p><p class=MsoNormal> try {</p><p class=MsoNormal> ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn");</p><p class=MsoNormal>- engine.eval("load('"+intermediateJSFileName+"');");</p><p class=MsoNormal>+ engine.eval("load('classpath:"+intermediateJSFileName+"');");</p><p class=MsoNormal> if (ConfigurationProperties.isDeleteIntermediateFiles()) // clean up when done</p><p class=MsoNormal> intermediateJSFilePath.toFile().deleteOnExit();</p><p class=MsoNormal> engine.eval("print('Hello World!');");</p></div></body></html>