[x3d-public] CLASSPATH not set in X3DJSAIL. Problems generating JSON from Nashorn

John Carlson yottzumm at gmail.com
Fri Jan 26 01:45:44 PST 2018


This works:


$ jjs -J-Djava.class.path=jars/X3DJSAIL.3.3.full.jar nashorn/examples/HelloWorldProgramOutput.Nashorn.js
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.json does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Script DEF=colorTypeConversionScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=MaterialModulatorScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode

Yay!

John

Sent from Mail for Windows 10

From: John Carlson
Sent: Friday, January 26, 2018 4:11 AM
To: x3d-public at web3d.org; Don Brutzman
Subject: CLASSPATH not set in X3DJSAIL. Problems generating JSON from Nashorn

Even though I set the classpath in x3d/stylesheets/java, it’s not picked up for some reason???  This is only when generating JSON. Hmm.

$ jjs -cp jars/X3DJSAIL.3.3.full.jar nashorn/examples/HelloWorldProgramOutput.Nashorn.js
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.json does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ERROR_CONFIGURATION_X3DJSAIL X3DJSAIL jar archive "" not found in CLASSPATH=
        at org.web3d.x3d.jsail.Core.X3DObject.toFileStylesheetConversion(X3DObject.java:1029)
        at org.web3d.x3d.jsail.Core.X3DObject.toFileStylesheetConversion(X3DObject.java:841)
        at org.web3d.x3d.jsail.Core.X3DObject.toFileJSON(X3DObject.java:1702)
        at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$609$HelloWorldProgramOutput_Nashorn$cu1$restOf.:program(nashorn/examples/HelloWorldProgramOutput.Nashorn.js:248)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
        at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
        at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)

C:\x3d-code\www.web3d.org\x3d\stylesheets\java>jjs -cp jars\X3DJSAIL.3.3.classes.jar;lib\exificient-gui-jar-with-dependencies.jar;..\saxon9he.jar nashorn\examples\HelloWorldProgramOutput.Nashorn.js
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Warning: toFileX3D() is overwriting prior file nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.x3d
Warning: nashorn/examples/HelloWorldProgramOutput.Nashorn.js.new.json does not meet suggested X3D naming conventions. Output serialization allowed to continue, file may be editable...
Exception in thread "main" org.web3d.x3d.sai.InvalidFieldValueException: ERROR_CONFIGURATION_X3DJSAIL X3DJSAIL jar archive "" not found in CLASSPATH=
        at org.web3d.x3d.jsail.Core.X3DObject.toFileStylesheetConversion(X3DObject.java:1029)
        at org.web3d.x3d.jsail.Core.X3DObject.toFileStylesheetConversion(X3DObject.java:841)
        at org.web3d.x3d.jsail.Core.X3DObject.toFileJSON(X3DObject.java:1702)
        at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$609$HelloWorldProgramOutput_Nashorn$cu1$restOf.:program(nashorn\examples\HelloWorldProgramOutput.Nashorn.js:248)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:652)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
        at jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:517)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.apply(Shell.java:519)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.runScripts(Shell.java:448)
        at jdk.scripting.nashorn/jdk.nashorn.tools.Shell.run(Shell.java:186)
        at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:104)
        at jdk.scripting.nashorn.shell/jdk.nashorn.tools.jjs.Main.main(Main.java:80)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180126/08777696/attachment-0001.html>


More information about the x3d-public mailing list