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

John Carlson yottzumm at gmail.com
Mon Sep 11 14:38:03 PDT 2017


Try using JavaWS (web start) and a .jnlp file.  I am not sure of the status of these as I have not used them since Java 6.

Or you can create an uber jar.

There should be a way to include a jar in a jar, but it’s non-standard, custom code.

Or change the classpath, removing the usefulness of a single jar.

What you’ve got here is kind of  a random fix to a non-issue.   Did you address my issues with creating output folders?

Also, I am not sure what you are doing with the jar url with stylesheets, but I’m going to assume it works for now.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Sunday, September 10, 2017 11:31 PM
To: John Carlson
Cc: Roy Walmsley; X3D Graphics public mailing list
Subject: Re: X3DJSAIL: command line option to force output directory creation

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170911/3972671e/attachment.html>


More information about the x3d-public mailing list