[x3d-public] CommandLine properties

John Carlson yottzumm at gmail.com
Tue Jan 2 08:38:42 PST 2018


Do you put output from running HelloWorldProgramOutput.java in a log file?
 That's what I want to look at.

On Jan 2, 2018 5:14 AM, "Don Brutzman" <brutzman at nps.edu> wrote:

> Most of the answer:
>
> Yes the CommandLine approach can take property files as a switch.
>
> http://www.web3d.org/specifications/java/X3DJSAIL.html#CommandLine
>
> java -classpath someLocalPath/X3DJSAIL.3.3.full.jar
>      [sourceModel.x3d | -help | -page | -resources | -tooltips]
>      [-tofile [resultFile.*]] [-properties [propertiesFile]] [-validate]
>      [sourceModel.exi -fromEXI] [sourceModel.gz -fromGZIP]
> [sourceModel.zip -fromZIP]
>      [-toX3D | -toXML | -toClassicVrml | -toJSON | -toVRML97 | -toX3DOM |
> -toX_ITE | -toGZIP | -toZIP]
>
> Example and template properties are linked in the X3DJSAIL page, as are a
> variety of methods if using code directly (rather than CommandLine):
>
>         Utility Methods and Functionality
>         http://www.web3d.org/specifications/java/X3DJSAIL.html#
> UtilityMethods
>
>         http://www.web3d.org/specifications/java/X3DJSAIL.properties
> .template
>
>         http://www.web3d.org/specifications/java/examples/X3DJSAIL.
> properties
>
> =========================================================
> # X3DJSAIL.properties example
>
> # Author TODO edit and save X3DJSAIL.properties.template as
> X3DJSAIL.properties
> # in project-invocation directory of interest
>
> deleteIntermediateFiles=true
>  indentIncrement=2
> #indentCharacter allowed values are SPACE (default) and TAB
>  indentCharacter=SPACE
>
> overwriteExistingFiles=true
> showDefaultAttributes=false
> stripTrailingZeroes=true
> validationExceptionAllowed=false
>
> #EXI_ENGINE allowed values are EXIFICIENT (default) and OPENEXI
>  EXI_ENGINE=EXIFICIENT
>
> #XSLT_ENGINE allowed values are SAXON (default) and NATIVE_JAVA
>  XSLT_ENGINE=SAXON
> =========================================================
>
> See ant build.xml <target name="test.X3DJSAIL"> in the stylesheets/ parent
> directory for example invocation.  Excerpt:
>
> <echo message="==========================================="/>
> <echo message="org.web3d.x3d.jsail.CommandLine -properties
> ${java.examples.dir}/X3DJSAIL.properties"/>
> <java classname="org.web3d.x3d.jsail.CommandLine"
> classpath="${saxon.dir}/${saxon.jar};${java.jars.dir}/${jsai
> .full.archive.jar.name};." fork="${fork}">
>         <arg value="-properties"/>
>         <arg value="${java.examples.dir}/X3DJSAIL.properties"/>
> </java>
> <echo message="==========================================="/>
>
> You should not have to worry about containerField.  If you are, you
> probably are using the wrong method.  If you find a case that still needs
> it, then I need to worry about making that case go away.
>
> I think the examples and outputs are OK... please vector me in further as
> needed (there are a lot of materials and multiple prototype examples for
> testing).
>
> I haven't worked with test.nashorn much at all yet, great that you are
> pursuing that!
>
> Thanks for your efforts John.
>
> On 12/31/2017 6:39 PM, John Carlson wrote:
>
>> Don, can you add correct properties command-line to
>> HelloWorldProgramOutput in www.web3d.org/x3d/stylesheets/java/build.xml <
>> http://www.web3d.org/x3d/stylesheets/java/build.xml>
>> test.HelloWorldProgramOutput and test.nashorn to use correct properties
>> file/stylesheet engine, so nashorn/examples/HelloWorldProgramOutput.json
>> will be correct (extra newlines appearing in JSON file)?  I tried moving a
>> X3DJSAIL.properties file to that folder, but changing the stylesheet engine
>> property, there’s no difference in output.
>>
>> I tried passing -properties, but I don’t think it’s handled in
>> handleArguments().
>>
>> Here is the area of coding below. There are 2 similar JSON java runs that
>> need to be processed, similar to below.
>>
>> The MFString quoting issue appears to be fixed, but further tests are
>> required.
>>
>> The material containerField Appearance.setMaterial(new ProtoInstance…
>> still doesn’t appear fixed in java program HelloWorldProgramOutput  output
>> XML or JSON or JS (missing or wrong containerField?). Code snippet from
>> X3DJSAIL proving fix welcome.  Or any output from
>> HelloWorldProgramOutput.java.
>>
>>
>> Thanks,
>>
>> John
>>
>>                  <java classname="HelloWorldProgramOutput"
>> classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.
>> archive.jar.name}" fork="${fork}">
>>
>>                      <arg value="-properties"/>
>>
>>                      <arg value="X3DJSAIL.properties"/>
>>
>>                      <arg value="json"/>
>>
>>                      <arg value="nashorn/examples/HelloW
>> orldProgramOutput.json"/>
>>
>>                  </java>
>>
>
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzma
> n
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180102/46aff7c2/attachment-0001.html>


More information about the x3d-public mailing list