<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, you have 2 ways of handling arguments. One for CommandLine , run(), and one for X3DObject, handleArguments().</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:brutzman@nps.edu">Don Brutzman</a><br><b>Sent: </b>Tuesday, January 2, 2018 5:14 AM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br><b>Subject: </b>Re: CommandLine properties</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Most of the answer:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Yes the CommandLine approach can take property files as a switch.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>http://www.web3d.org/specifications/java/X3DJSAIL.html#CommandLine</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>java -classpath someLocalPath/X3DJSAIL.3.3.full.jar</p><p class=MsoNormal>      [sourceModel.x3d | -help | -page | -resources | -tooltips]</p><p class=MsoNormal>      [-tofile [resultFile.*]] [-properties [propertiesFile]] [-validate]</p><p class=MsoNormal>      [sourceModel.exi -fromEXI] [sourceModel.gz -fromGZIP] [sourceModel.zip -fromZIP]</p><p class=MsoNormal>      [-toX3D | -toXML | -toClassicVrml | -toJSON | -toVRML97 | -toX3DOM | -toX_ITE | -toGZIP | -toZIP]</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example and template properties are linked in the X3DJSAIL page, as are a variety of methods if using code directly (rather than CommandLine):</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                Utility Methods and Functionality</p><p class=MsoNormal>                http://www.web3d.org/specifications/java/X3DJSAIL.html#UtilityMethods</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                http://www.web3d.org/specifications/java/X3DJSAIL.properties.template</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                http://www.web3d.org/specifications/java/examples/X3DJSAIL.properties</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>=========================================================</p><p class=MsoNormal># X3DJSAIL.properties example</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal># Author TODO edit and save X3DJSAIL.properties.template as X3DJSAIL.properties</p><p class=MsoNormal># in project-invocation directory of interest</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>deleteIntermediateFiles=true</p><p class=MsoNormal>  indentIncrement=2</p><p class=MsoNormal>#indentCharacter allowed values are SPACE (default) and TAB</p><p class=MsoNormal>  indentCharacter=SPACE</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>overwriteExistingFiles=true</p><p class=MsoNormal>showDefaultAttributes=false</p><p class=MsoNormal>stripTrailingZeroes=true</p><p class=MsoNormal>validationExceptionAllowed=false</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#EXI_ENGINE allowed values are EXIFICIENT (default) and OPENEXI</p><p class=MsoNormal>  EXI_ENGINE=EXIFICIENT</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>#XSLT_ENGINE allowed values are SAXON (default) and NATIVE_JAVA</p><p class=MsoNormal>  XSLT_ENGINE=SAXON</p><p class=MsoNormal>=========================================================</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>See ant build.xml <target name="test.X3DJSAIL"> in the stylesheets/ parent directory for example invocation.  Excerpt:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><echo message="==========================================="/></p><p class=MsoNormal><echo message="org.web3d.x3d.jsail.CommandLine -properties ${java.examples.dir}/X3DJSAIL.properties"/></p><p class=MsoNormal><java classname="org.web3d.x3d.jsail.CommandLine" classpath="${saxon.dir}/${saxon.jar};${java.jars.dir}/${jsai.full.archive.jar.name};." fork="${fork}"></p><p class=MsoNormal>                <arg value="-properties"/></p><p class=MsoNormal>                <arg value="${java.examples.dir}/X3DJSAIL.properties"/></p><p class=MsoNormal></java></p><p class=MsoNormal><echo message="==========================================="/></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I haven't worked with test.nashorn much at all yet, great that you are pursuing that!</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for your efforts John.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On 12/31/2017 6:39 PM, John Carlson wrote:</p><p class=MsoNormal>> 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.</p><p class=MsoNormal>> </p><p class=MsoNormal>> I tried passing -properties, but I don’t think it’s handled in handleArguments().</p><p class=MsoNormal>> </p><p class=MsoNormal>> Here is the area of coding below. There are 2 similar JSON java runs that need to be processed, similar to below.</p><p class=MsoNormal>> </p><p class=MsoNormal>> The MFString quoting issue appears to be fixed, but further tests are required.</p><p class=MsoNormal>> </p><p class=MsoNormal>> 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.</p><p class=MsoNormal>> </p><p class=MsoNormal>> </p><p class=MsoNormal>> Thanks,</p><p class=MsoNormal>> </p><p class=MsoNormal>> John</p><p class=MsoNormal>> </p><p class=MsoNormal>>                  <java classname="HelloWorldProgramOutput" classpath="${java.classes.dir};${java.jars.dir}/${jsai.full.archive.jar.name}" fork="${fork}"></p><p class=MsoNormal>> </p><p class=MsoNormal>>                      <arg value="-properties"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                      <arg value="X3DJSAIL.properties"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                      <arg value="json"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                      <arg value="nashorn/examples/HelloWorldProgramOutput.json"/></p><p class=MsoNormal>> </p><p class=MsoNormal>>                  </java></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>all the best, Don</p><p class=MsoNormal>-- </p><p class=MsoNormal>Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman@nps.edu</p><p class=MsoNormal>Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149</p><p class=MsoNormal>X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>