Re: problem with jar files run from a jnlp - I GOT IT!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: problem with jar files run from a jnlp - I GOT IT!

kenner

It’s most often the simple stuff. I was chasing my tail going after the ClassLoader. What the class has to do with the jar files still baffles me. I finally tried using the forward slash rather than Microsloth’s back slash, and the getClass.getResourceAsStream started working. And I had thought all the examples I found were from *nix machines :-\

 

139 *=*  LoadTable(fileIn)

     >>> "Yeast for substyle.txt"

598 *=*         fs = System.getProperty("file.separator");

     >>> "file.separator"

     >p> fs "\"

599 *=*         cp =  System.getProperty("java.class.path")

     >>> "java.class.path"

     >v> cp "C:\\Program Files\\Java\\jre7\\lib\\deploy.jar"

600 *=*         say "Class Path=" cp

     >>> "Class Path= C:\\Program Files\\Java\\jre7\\lib\\deploy.jar"

Class Path= C:\\Program Files\\Java\\jre7\\lib\\deploy.jar

601 *=*   cl = ClassLoader

602 *=*   cl = this.getclass().getClassLoader()

     >v> cl "com.sun.jnlp.JNLPClassLoader@3cbb4b"

603 *=* --      is = this.getClass.getResourceAsStream("txt_files" || fs || afileName);

604 *=*           is = this.getClass.getResourceAsStream("txt_files/" || afileName);

     >>> "txt_files/Yeast for substyle.txt"

     >p> is "java.util.zip.ZipFile$ZipFileInflaterInputStream@6ac42f"

605 *=* --          name = cl.getResource("txt_files" || fs || afileName);

606 *=* --          is = name.openStream();

607 *=*           scan = Scanner

608 *=*           scan = Scanner(is);

     >>> "java.util.zip.ZipFile$ZipFileInflaterInputStream@6ac42f"

     >v> scan "java.util.Scanner[delimiters=\p{javaWhitespace}+][position=0][match valid=false][need input=false][source closed=false][skipped=false][group separator=\,][decimal separator=\.][positive prefix=][negative prefix=\Q-\E][positive suffix=][negative suffix=][NaN string=\Q?\E][infinity string=\Q?\E]"

609 *=*           if Debug_Level > 30

     >>> "0"

615 *=*      isr = InputStreamReader(is)

     >>> "java.util.zip.ZipFile$ZipFileInflaterInputStream@6ac42f"

     >v> isr "java.io.InputStreamReader@16564ae"

616 *=*      reader = BufferedReader(isr)

     >>> "java.io.InputStreamReader@16564ae"

     >v> reader "java.io.BufferedReader@1b5139e"

617 *=*    say 'Processing infile.' afileName

     >>> "Processing infile. Yeast for substyle.txt"

Processing infile. Yeast for substyle.txt


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: problem with jar files run from a jnlp - I GOT IT!

kenner

Now I have hit another hurdle on the learning curve of netrexx/java. This program was working well, then I made a few “small” changes to the file output routines and zing, it all went there in a handbasket.

 

 

 

 

cid:image001.png@01CE008A.10605A80

 

 

 

 

 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/