[x3d-public] Errors in my X3DJSAIL HelloWorldProgramOutput.java command line, generating XML, JSON and JS

John Carlson yottzumm at gmail.com
Thu Jan 11 11:10:26 PST 2018


I don't see as why I need the original source file, as the X3DObject is
loaded into memory and passed to CommandLine.   Loading an XML file was not
required with the old handleArguments(), and I think a test to see whether
the object is loaded into memory may be all that is required.  I will look
at modifying the source code.
John


On Jan 11, 2018 1:45 PM, "Brutzman, Donald (Don) (CIV)" <brutzman at nps.edu>
wrote:

Yes. You also need to tell it original source file that you were loading
first.  That way it knows what to load, which is necessary before it can
save out as a different version.

A list of all switches can be found on X3DJSAIL page under CommandLine.

Sent from my handheld device

On Jan 11, 2018, at 01:33, John Carlson <yottzumm at gmail.com> wrote:

Incomplete?



Build:



test.nashorn:

     [echo] Compile:

     [echo] Run:

     [java] parameter: "-toJS" for conversion to JSON encoding

     [java] parameter: "-toFile" "nashorn/examples/
HelloWorldProgramOutputOutput.js" for result file name root
nashorn/examples/HelloWorldProgramOutputOutput

     [java] [Error] Source model file name is empty, therefore file loading
not possible.

     [java] parameter: "-toJSON" for conversion to JSON encoding

     [java] parameter: "-toFile" "nashorn/examples/
HelloWorldProgramOutputOutput.json" for result file name root
nashorn/examples/HelloWorldProgramOutputOutput

     [java] [Error] Source model file name is empty, therefore file loading
not possible.

     [java] parameter: "-toX3D" for conversion to X3D encoding

     [java] parameter: "-toFile" "nashorn/examples/
HelloWorldProgramOutputOutput.x3d" for result file name root
nashorn/examples/HelloWorldProgramOutputOutput

     [java] [Error] Source model file name is empty, therefore file loading
not possible.





Ant script:



                <java classname="HelloWorldProgramOutput"
classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name}"
fork="${fork}">

                        <arg value="-toJS"/>

                        <arg value="-toFile"/>

                        <arg value="nashorn/examples/
HelloWorldProgramOutputOutput.js"/>

                </java>

                <java classname="HelloWorldProgramOutput"
classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name}"
fork="${fork}">

                    <arg value="-toJSON"/>

                    <arg value="-toFile"/>

                    <arg value="nashorn/examples/
HelloWorldProgramOutputOutput.json"/>

                </java>

                <java classname="HelloWorldProgramOutput"
classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name}"
fork="${fork}">

                    <arg value="-toX3D"/>

                    <arg value="-toFile"/>

                    <arg value="nashorn/examples/
HelloWorldProgramOutputOutput.x3d"/>

                </java>





How to do it?



Thanks,



John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180111/2dbaf7fd/attachment.html>


More information about the x3d-public mailing list