<div><div dir="auto">AFAIK, HelloWorldProgramOutput is not an argument to HelloWorldProgramOutput.class java process, and thus, is not available as an argument.   Try it in a small test program.</div></div><div dir="auto"><br></div><div dir="auto">I can however provide it twice to see if it works.   Will try Saturday or sometime.</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 24, 2018 at 2:08 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sorry but still not understanding what you are trying to do, it doesn't match CommandLine invocation syntax.<br>
<br>
"HelloWorldProgramOutput" is not a legal file name for CommandLine to operate on.<br>
<br>
Looks like you are effectively getting Java to run the HelloWorldProgramOutput.class (which reports successful self-validation) in addition to running (and failing) CommandLine.<br>
<br>
recommend breaking this down into more discrete explicit steps, rather than a double execution.<br>
<br>
<br>
On 7/20/2018 6:13 AM, John Carlson wrote:<br>
> I run this in  java/classes after running ant test.nashorn, so our invocations are slightly different.  I am trying to debug the HelloWorldProgramOutput.java, which I don’t know if you’ve tried to debug or not.<br>
> <br>
> HelloWorldProgramOutput.class is a file in my classes folder, so yes it’s executable.  I’m trying to run it to dump out Java, JSON, etc.<br>
> <br>
> My problems are still current:<br>
> <br>
> coderextreme@DESKTOP-DOPK2VD MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/classes" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/java/classes</a><br>
> <br>
> $ java -cp ../jars/X3DJSAIL.3.3.full.jar";." HelloWorldProgramOutput -tofile foo.java -toJava<br>
> <br>
> parameter: "-tofile" "foo.java" for result file name root foo<br>
> <br>
> parameter: "-toJava" for conversion to Java source code<br>
> <br>
> [Error] Source model file name is empty, therefore file loading not possible.<br>
> <br>
> Java program "HelloWorldProgramOutput" self-validation test results: success<br>
> <br>
> Please test with HelloWorldProgramOutput.class, thanks! I’m trying to debug X3dToJava.xslt AND X3DJSAIL. If output from X3dToJava.xslt no longer takes arguments, please take that code out, or replace it with something that works.<br>
> <br>
> Note that I do not have a -jar argument. That is intentional.<br>
> <br>
> John<br>
> <br>
> Sent from Mail <<a href="https://go.microsoft.com/fwlink/?LinkId=550986" rel="noreferrer" target="_blank">https://go.microsoft.com/fwlink/?LinkId=550986</a>> for Windows 10<br>
> <br>
> *From: *Don Brutzman <mailto:<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>><br>
> *Sent: *Friday, July 20, 2018 6:32 AM<br>
> *To: *John Carlson <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>
> *Cc: *X3D Graphics public mailing list <mailto:<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>
> *Subject: *Re: X3DJSAIL running generated Java program to produce Java<br>
> <br>
> Thanks for the report.<br>
> <br>
> First I think that your jar is likely out of date, the diagnostics are familiar from the past but do not match current configuration.<br>
> <br>
> <a href="http://www.web3d.org/specifications/java/X3DJSAIL.html#Downloads" rel="noreferrer" target="_blank">http://www.web3d.org/specifications/java/X3DJSAIL.html#Downloads</a><br>
> <br>
> Second, the error is trying to tell you that the file "HelloWorldProgramOutput" is not found.<br>
> <br>
> I get the following:<br>
> <br>
> [Error]  [org.web3d.x3d.jsail.CommandLine] file not found: HelloWorldProgramOutput<br>
> <br>
> Usage: java [-classpath X3DJSAIL.*.jar] org.web3d.x3d.jsail.CommandLine [sourceModel.x3d | package.path.ProgramName | -help | -page | -resources | -tooltips]<br>
> <br>
>          [-tofile [resultFile.*]] [-properties [propertiesFile]] [-validate]<br>
> <br>
>          [sourceModel.exi -fromEXI] [sourceModel.gz -fromGZIP] [sourceModel.zip -fromZIP]<br>
> <br>
>          [-toX3D | -toXML | -toHTML | -toMarkdown | -toTidy | -toClassicVrml | -toJava | -toJSON | -toVRML97 | -toX3DOM | -toX_ITE | -toEXI | -toGZIP | -toZIP]<br>
> <br>
> Which likely makes sense for your system too, since the examples/ directory does not have any file "HelloWorldProgramOutput" except for those with a file extension added.<br>
> <br>
> Incidentally to facilitate such testing using IDE debug mode, I added a utility method CommandLine.run(String arguments) which will accept a single string and split it into args.  Example use is now in HelloWorld.java main method, adapted here:<br>
> <br>
>     // Quick test of CommandLine capability to facilitate debugging:<br>
> <br>
>     org.web3d.x3d.jsail.CommandLine.run("HelloWorldProgramOutput  -tofile foo.java -toJava"); // allows simple testing<br>
> <br>
> On 7/17/2018 6:51 PM, John Carlson wrote:<br>
> <br>
>  > Trying to produce Java source code from Java class, not working ,please advise:<br>
> <br>
>  ><br>
> <br>
>  > coderextreme@DESKTOP-DOPK2VD MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/classes" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/java/classes</a><br>
> <br>
>  ><br>
> <br>
>  > $ java -cp ../jars/X3DJSAIL.3.3.full.jar";." HelloWorldProgramOutput -tofile foo.java -toJava<br>
> <br>
>  ><br>
> <br>
>  > parameter: "-tofile" "foo.java" for result file name root foo<br>
> <br>
>  ><br>
> <br>
>  > parameter: "-toJava" for conversion to Java source code<br>
> <br>
>  ><br>
> <br>
>  > [Error] Source model file name is empty, therefore file loading not possible.<br>
> <br>
>  ><br>
> <br>
>  > Java program "HelloWorldProgramOutput" self-validation test results: success<br>
> <br>
>  ><br>
> <br>
>  > coderextreme@DESKTOP-DOPK2VD MINGW64 /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/classes" rel="noreferrer" target="_blank">www.web3d.org/x3d/stylesheets/java/classes</a><br>
> <br>
>  ><br>
> <br>
>  > $ java -cp ../jars/X3DJSAIL.3.3.full.jar";." HelloWorldProgramOutput ../examples/HelloWorldProgramOutput.x3d -tofile foo.java -toJava<br>
> <br>
>  ><br>
> <br>
>  > WARNING: "HelloWorldProgramOutput" model invocation is attempting to load file "../examples/HelloWorldProgramOutput.x3d" instead of simply validating itself...<br>
> <br>
>  ><br>
> <br>
>  > No, CommandLine is not the correct answer.<br>
> <br>
> actually yes I think precise CommandLine invocation was the answer.  given that your invocation was different than mine, you might have also been getting Java treating "HelloWorldProgramOutput" as an executable referrence.  Whatever - recommend omitting "HelloWorldProgramOutput" above and getting switches correct.<br>
> <br>
>  > Are we trying to provide a secure mechanism for people to write code so you can’t get the X3D XML or Java source code back out?    What about decompilers?<br>
> <br>
> nope, no hidden protections.  CommandLine source shows that most of the code is simply trying to parse arguments correctly.<br>
> <br>
> all the best, Don<br>
> <br>
> -- <br>
> <br>
> Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
> <br>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
> <br>
> X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
> <br>
<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
</blockquote></div></div>