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

John Carlson yottzumm at gmail.com
Tue Sep 12 19:44:28 PDT 2017


See my code for loading a class from a classloader created from a jar URI.
  You'll probably have to do that in addition to a URI resolver to find the
jar within a jar.    Both sets of code have been posted under different
purpose. Consider using .jnlp's referencing .jnlp (web start).

On Sep 12, 2017 5:21 PM, "Don Brutzman" <brutzman at nps.edu> wrote:

> Am trying to get baseline functionality working first.  Then can add
> robustness such as checking directory paths, reporting problems with
> output-directory write permissions, etc.
>
> Still feels close... just need to get "jar within a jar" working, long
> classpaths aren't friendly or portable.
>
> On 9/11/2017 2:38 PM, John Carlson wrote:
>
>> 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 <https://go.microsoft.com/fwlink/?LinkId=550986> for
>> Windows 10
>>
>> *From: *Don Brutzman <mailto:brutzman at nps.edu>
>> *Sent: *Sunday, September 10, 2017 11:31 PM
>> *To: *John Carlson <mailto:yottzumm at gmail.com>
>> *Cc: *Roy Walmsley <mailto:roy.walmsley at ntlworld.com>; X3D Graphics
>> public mailing list <mailto:x3d-public at web3d.org>
>> *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
>>
>>
>
> 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/20170912/cec1549e/attachment-0001.html>


More information about the x3d-public mailing list