[x3d-public] X3DJSAIL: command line option to force output directory creation

Don Brutzman brutzman at nps.edu
Sun Sep 10 20:31:53 PDT 2017


Hi John, getting closer... Have added a new CommandLine class and modified the 
.jar files to handle command-line invocation.

http://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html

Latest build is still having trouble with visibility of saxon8he.jar within the 
X3DJSAIL .jar.

$ pwd
$ /cygdrive/c/x3d-code/www.web3d.org/x3d/stylesheets/java/examples
$ java -jar ../jars/X3DJSAIL.3.3.classes.jar 
HelloWorldProgramOutput.Reloaded.x3d -classicVRML
parameter: -classicVRML for conversion to ClassicVRML encoding 
HelloWorldProgramOutput.Reloaded.x3dv
Exception in thread "main" java.lang.NoClassDefFoundError: 
net/sf/saxon/s9api/SaxonApiException
         at org.web3d.x3d.jsail.CommandLine.main(CommandLine.java:149)
Caused by: java.lang.ClassNotFoundException: net.sf.saxon.s9api.SaxonApiException
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         ... 1 more

Have found that Class-Path within .jar is not able to handle internal paths. 
Haven't found correct approach yet.  In this case, am trying to provide internal 
visibility to saxon9he.jar which is within X3DJSAIL.3.3.classes.jar

https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
===================================================================
Note: The Class-Path header points to classes or JAR files on the local network, 
not JAR files within the JAR file or classes accessible over Internet protocols. 
To load classes in JAR files within a JAR file into the class path, you must 
write custom code to load those classes. For example, if MyJar.jar contains 
another JAR file called MyUtils.jar, you cannot use the Class-Path header in 
MyJar.jar's manifest to load classes in MyUtils.jar into the class path.
===================================================================

On 9/1/2017 2:04 PM, John Carlson wrote:
> Don,
> 
> You may want to add an argument to X3DJSAIL app programs to allow the caller to 
> allow the argument handler to create output folders if they don’t already exist. 
> -f?  Or add it as a configuration property, if not already there.
> 
> John

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/brutzman



More information about the x3d-public mailing list