Hello there,
as all of you know (from too many advertisements in the past), I'm working here on my own NetRexx Parser. I'm trying now to complete this never ending story, as a first step to deliver RexxForm, a generalized Rexx Formatter, which should be usable for classic Rexx, ooRexx, and NetRexx as well. Whil'st I think I do have enough *correct testcases* for the minute, I would be interested to collect *bad* (wrong) testcases as well. When you do have by instance *good samples* for bad programs containing faults, please forward them directly to me. I will collect them in an own directory, and could forward them afterwards to Rob Wilson as well for NetRexxC regression tests when Rene &/ Rob are interested ... I'm feeling now again better a bit, an would like to finish that otherwise never ending story. Kind regards from Vienna, and have a merry X-mas and happy new year, anyway. Kepp up your good usage of the various Rexx dialects and implementantions, anyway! Greetings from Vienna, Thomas. -- Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
I have a couple apps which run as standalone programs from the command line without any problems. They compile fine. FrontEnd can call QandAgui and have the correct file loaded in the table or QandAgui can run and prompt the user as to which file to load. However, when I create a JAR file with the 2 classes and their files - execution fails at runtime with netrexx.lang.Rexx not getting found. It's in the classpath and in the jar file and in the manefest.txt file. What's wrong? Do I need to create a "Package"? C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > nrc FrontEnd.nrx QandAgui.nrx NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. 71 classes imported from 'java.text.' Standard package 'java.util.' re-imported 2 classes imported from 'netrexx.lang.Rexx' Standard package 'java.awt.' re-imported 44 classes imported from 'java.awt.event.' 1782 classes imported from 'javax.swing.' Loaded public abstract class 'java.awt.Component' Loaded public class 'java.awt.Container' Loaded public class 'java.awt.Window' Loaded public class 'java.awt.Frame' Loaded public abstract interface class 'java.awt.MenuContainer' Loaded public abstract class 'java.awt.event.WindowAdapter' Loaded public abstract interface class 'java.awt.event.WindowListener' Loaded public abstract interface class 'java.awt.event.WindowStateListener' Loaded public abstract interface class 'java.awt.event.WindowFocusListener' Loaded public abstract interface class 'java.awt.event.ItemListener' Translating 'QandAgui.nrx' [Pass 1] === class QandAgui === [pass 1] Loaded public class 'netrexx.lang.Rexx' method main [line 37] method LoadTable [line 66] Loaded public class 'java.lang.Throwable' Loaded public class 'java.lang.Exception' Loaded public class 'java.io.IOException' Loaded public class 'java.lang.RuntimeException' Loaded public class 'java.lang.Error' method QandAgui [line 119] method GetRand [line 149] === class AboutFrame === [pass 1] Loaded public abstract interface class 'java.awt.image.ImageObserver' Loaded public abstract interface class 'javax.accessibility.Accessible' Loaded public class 'java.awt.TextComponent' Loaded public class 'java.awt.TextArea' Loaded public class 'java.lang.UnsupportedOperationException' Loaded public class 'java.awt.HeadlessException' Loaded public class 'java.awt.List' Loaded public class 'java.awt.Button' method AboutFrame [line 175] method SetTitle [line 246] method Set_Question [line 250] method Set_Pos_Answer [line 253] method Set_Pos_Answer [line 259] method SelectQuestion [line 265] method ShowAbout [line 268] === class AboutFrameController === [pass 1] method windowClosing [line 276] Loaded public class 'java.awt.event.WindowEvent' === class AboutActionClass === [pass 1] method AboutActionClass [line 288] method actionPerformed [line 292] method itemStateChanged [line 323] Loaded public class 'java.awt.event.ItemEvent' Program FrontEnd.nrx === class FrontEnd === function main(String[]) constructor FrontEnd(int,int) method ScoreBoardUpdate(int,int) method ScoreBoardClose method actionPerformed(ActionEvent) implements ActionListener.actionPerformed(ActionEvent) method keyTyped(KeyEvent) implements KeyListener.keyTyped(KeyEvent) method keyPressed(KeyEvent) implements KeyListener.keyPressed(KeyEvent) method keyReleased(KeyEvent) implements KeyListener.keyReleased(KeyEvent) method MultipleChoice(Rexx) Program QandAgui.nrx [pass 2, over 323 clauses] === class QandAgui === function main(String[]) Loaded public class 'netrexx.lang.BadArgumentException' signals IOException function LoadTable(Rexx) Loaded public abstract class 'java.io.Reader' Loaded public class 'java.io.InputStreamReader' Loaded public class 'java.io.FileReader' Loaded public class 'java.io.File' Loaded public final class 'java.io.FileDescriptor' Loaded public class 'java.io.FileNotFoundException' Loaded public class 'java.io.BufferedReader' constructor QandAgui(int) function GetRand(int) Loaded public final class 'java.lang.Math' === class AboutFrame === constructor AboutFrame(String,String,String,String,String,String,String,String,String,String,Str ing,int) Loaded public class 'java.awt.Panel' Loaded public class 'java.awt.Color' Loaded public abstract class 'java.awt.Toolkit' Loaded public abstract class 'java.awt.geom.Dimension2D' Loaded public class 'java.awt.Dimension' method setTitle(String) overrides Frame.setTitle(String) method Set_Question(String) method Set_Pos_Answer(String,String) method Set_Pos_Answer(String,String,String) method SelectQuestion(int) method ShowAbout === class AboutFrameController === method windowClosing(WindowEvent) overrides WindowAdapter.windowClosing(WindowEvent) === class AboutActionClass === constructor AboutActionClass(AboutFrame,String) method actionPerformed(ActionEvent) implements ActionListener.actionPerformed(ActionEvent) method itemStateChanged(ItemEvent) implements ItemListener.itemStateChanged(ItemEvent) Compiling: '-nowarn -classpath .;C:\Program Files\Java\jre6\lib\ext\NetRexxC.jar;C:\Program Files\Ja va\jre6\lib\ext\tools.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGR A~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\Java\jre6\lib\ext\QTJava. zip;C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\NetRexxC.jar;C:\Documents and Se ttings\keklein\My Documents\REXX\NetRexx\bin;C:\Documents and Settings\keklein\My Documents\REXX\Net Rexx\nrxredbk.zip;C:\Program Files\Java\jdk1.6.0_18\jre\lib\alt-rt.jar;C:\Program Files\Java\jdk1.6. 0_18\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\deploy.jar;C:\Program Files\Java \jdk1.6.0_18\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\jce.jar;C:\Program Files\J ava\jdk1.6.0_18\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\management-agent.jar;C:\P rogram Files\Java\jdk1.6.0_18\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\resources .jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\ dnsns.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6. 0_18\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunmscapi.jar;C:\ Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunpkcs11.jar -g C:\Documents and Settings\keklein\My Doc uments\REXX\NetRexx\bin\FrontEnd.java C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bi n\QandAgui.java' Compilation of 'FrontEnd.nrx' successful Compilation of 'QandAgui.nrx' successful [4 classes] C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > jar.exe -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.tx t "/Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" added manifest adding: Manifest.txt(in = 163) (out= 134)(deflated 17%) adding: FrontEnd.class(in = 14681) (out= 6340)(deflated 56%) adding: QandAgui.class(in = 18049) (out= 7604)(deflated 57%) adding: QandA.txt(in = 17079) (out= 3332)(deflated 80%) adding: TandF.txt(in = 14956) (out= 3700)(deflated 75%) adding: Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar(in = 352738) (out= 343255)(deflated 2%) C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > java -jar frontend.jar Exception in thread "main" java.lang.NoClassDefFoundError: netrexx/lang/Rexx at FrontEnd.<init>(FrontEnd.nrx:15) at FrontEnd.main(FrontEnd.nrx:20) Caused by: java.lang.ClassNotFoundException: netrexx.lang.Rexx at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more paths: "This is a nice list of your path at the moment:" . C:\Documents and Settings\keklein\ C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin C:\Documents and Settings\keklein\My Documents\REXX\NrxRedBk\Redbook C:\Program Files\vim\vim73 C:\PROGRA~1\IBM\SQLLIB\BIN C:\PROGRA~1\IBM\SQLLIB\FUNCTION C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL C:\Program Files\IBM\GSK7\bin C:\Program Files\IBM\GSK7\lib C:\Program Files\IBM\ITM\bin C:\Program Files\IBM\ITM\bin\dll C:\Program Files\IBM\ITM\InstallITM C:\Program Files\IBM\ITM\TMAITM6 C:\Program Files\IBM\Personal Communications\ C:\Program Files\IBM\Trace Facility\ C:\Program Files\Java\jdk1.6.0_18\bin C:\Program Files\QuickTime\QTSystem\ C:\program files\rmf\rmf spreadsheet reporter\ C:\Program Files\Windows Imaging\ C:\WINDOWS C:\WINDOWS\system32 C:\WINDOWS\System32\Wbem C:\Documents and Settings\keklein\My Documents\apache-ant-1.8.2\bin "This is a nice list of your classpath at the moment:" ". C:\Program Files\Java\jre6\lib\ext\NetRexxC.jar C:\Program Files\Java\jre6\lib\ext\tools.jar C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar C:\PROGRA~1\IBM\SQLLIB\bin C:\PROGRA~1\IBM\SQLLIB\java\common.jar C:\Program Files\Java\jre6\lib\ext\QTJava.zip C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\Rexx2Nrx.jar C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\NetRexxC.jar C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin\ C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\nrxredbk.zip" Done. Manifest.txt: Class-Path: /Program Files/Java/jre6/lib/ext/NetRexxC.jar;/Documents and Settings/keklein/My Documents/REXX/NetRexx/lib/NetRexxR.jar Main-Class: FrontEnd Kenneth Klein Systems Specialist 502-868-3644 859-750-5179 (Cell) 502-868-2298 (Fax) [hidden email] _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Your jar creation is incorrect. You must specify the manifest file with the cmdline options or include the directory META-INF/MANIFEST.MF. The From: [hidden email] [mailto:[hidden email]]
On Behalf Of [hidden email]
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
OK, thanks for that. I knew I was still a bit confused on the creation of the jar file with a Manifest.txt. But I still have the same problem.. C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 12:17 > jar -cfmv frontend.jar Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 12:17 > jar.exe -cfmv frontend.jar Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/Docum ents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" added manifest adding: FrontEnd.class(in = 14047) (out= 6077)(deflated 56%) adding: QandAgui.class(in = 18049) (out= 7604)(deflated 57%) adding: QandA.txt(in = 17079) (out= 3332)(deflated 80%) adding: TandF.txt(in = 14956) (out= 3700)(deflated 75%) adding: Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar(in = 352738) (out= 343255)(deflated 2%) C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 12:17 > java -jar frontend.jar Exception in thread "main" java.lang.NoClassDefFoundError: netrexx/lang/Rexx at FrontEnd.<init>(FrontEnd.nrx:15) at FrontEnd.main(FrontEnd.nrx:20) Caused by: java.lang.ClassNotFoundException: netrexx.lang.Rexx at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more Kenneth Klein Systems Specialist [hidden email]
Your jar creation is incorrect. You must specify the manifest file with the cmdline options or include the directory META-INF/MANIFEST.MF. The m option and filename manifesfile are a pair -- if either is present, they must both appear. The letters m and f must appear in the same order that manifest and jarfile appear. From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email] Sent: Tuesday, December 20, 2011 9:21 AM To: IBM Netrexx Subject: [Ibm-netrexx] noclassdeffounderror when executing a new jar I have a couple apps which run as standalone programs from the command line without any problems. They compile fine. FrontEnd can call QandAgui and have the correct file loaded in the table or QandAgui can run and prompt the user as to which file to load. However, when I create a JAR file with the 2 classes and their files - execution fails at runtime with netrexx.lang.Rexx not getting found. It's in the classpath and in the jar file and in the manefest.txt file. What's wrong? Do I need to create a "Package"? C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > nrc FrontEnd.nrx QandAgui.nrx NetRexx portable processor, version NetRexx 3.01RC2, build 1-20110925-2337 Copyright (c) RexxLA, 2011. All rights reserved. Parts Copyright (c) IBM Corporation, 1995,2008. 71 classes imported from 'java.text.' Standard package 'java.util.' re-imported 2 classes imported from 'netrexx.lang.Rexx' Standard package 'java.awt.' re-imported 44 classes imported from 'java.awt.event.' 1782 classes imported from 'javax.swing.' Loaded public abstract class 'java.awt.Component' Loaded public class 'java.awt.Container' Loaded public class 'java.awt.Window' Loaded public class 'java.awt.Frame' Loaded public abstract interface class 'java.awt.MenuContainer' Loaded public abstract class 'java.awt.event.WindowAdapter' Loaded public abstract interface class 'java.awt.event.WindowListener' Loaded public abstract interface class 'java.awt.event.WindowStateListener' Loaded public abstract interface class 'java.awt.event.WindowFocusListener' Loaded public abstract interface class 'java.awt.event.ItemListener' Translating 'QandAgui.nrx' [Pass 1] === class QandAgui === [pass 1] Loaded public class 'netrexx.lang.Rexx' method main [line 37] method LoadTable [line 66] Loaded public class 'java.lang.Throwable' Loaded public class 'java.lang.Exception' Loaded public class 'java.io.IOException' Loaded public class 'java.lang.RuntimeException' Loaded public class 'java.lang.Error' method QandAgui [line 119] method GetRand [line 149] === class AboutFrame === [pass 1] Loaded public abstract interface class 'java.awt.image.ImageObserver' Loaded public abstract interface class 'javax.accessibility.Accessible' Loaded public class 'java.awt.TextComponent' Loaded public class 'java.awt.TextArea' Loaded public class 'java.lang.UnsupportedOperationException' Loaded public class 'java.awt.HeadlessException' Loaded public class 'java.awt.List' Loaded public class 'java.awt.Button' method AboutFrame [line 175] method SetTitle [line 246] method Set_Question [line 250] method Set_Pos_Answer [line 253] method Set_Pos_Answer [line 259] method SelectQuestion [line 265] method ShowAbout [line 268] === class AboutFrameController === [pass 1] method windowClosing [line 276] Loaded public class 'java.awt.event.WindowEvent' === class AboutActionClass === [pass 1] method AboutActionClass [line 288] method actionPerformed [line 292] method itemStateChanged [line 323] Loaded public class 'java.awt.event.ItemEvent' Program FrontEnd.nrx === class FrontEnd === function main(String[]) constructor FrontEnd(int,int) method ScoreBoardUpdate(int,int) method ScoreBoardClose method actionPerformed(ActionEvent) implements ActionListener.actionPerformed(ActionEvent) method keyTyped(KeyEvent) implements KeyListener.keyTyped(KeyEvent) method keyPressed(KeyEvent) implements KeyListener.keyPressed(KeyEvent) method keyReleased(KeyEvent) implements KeyListener.keyReleased(KeyEvent) method MultipleChoice(Rexx) Program QandAgui.nrx [pass 2, over 323 clauses] === class QandAgui === function main(String[]) Loaded public class 'netrexx.lang.BadArgumentException' signals IOException function LoadTable(Rexx) Loaded public abstract class 'java.io.Reader' Loaded public class 'java.io.InputStreamReader' Loaded public class 'java.io.FileReader' Loaded public class 'java.io.File' Loaded public final class 'java.io.FileDescriptor' Loaded public class 'java.io.FileNotFoundException' Loaded public class 'java.io.BufferedReader' constructor QandAgui(int) function GetRand(int) Loaded public final class 'java.lang.Math' === class AboutFrame === constructor AboutFrame(String,String,String,String,String,String,String,String,String,String,Str ing,int) Loaded public class 'java.awt.Panel' Loaded public class 'java.awt.Color' Loaded public abstract class 'java.awt.Toolkit' Loaded public abstract class 'java.awt.geom.Dimension2D' Loaded public class 'java.awt.Dimension' method setTitle(String) overrides Frame.setTitle(String) method Set_Question(String) method Set_Pos_Answer(String,String) method Set_Pos_Answer(String,String,String) method SelectQuestion(int) method ShowAbout === class AboutFrameController === method windowClosing(WindowEvent) overrides WindowAdapter.windowClosing(WindowEvent) === class AboutActionClass === constructor AboutActionClass(AboutFrame,String) method actionPerformed(ActionEvent) implements ActionListener.actionPerformed(ActionEvent) method itemStateChanged(ItemEvent) implements ItemListener.itemStateChanged(ItemEvent) Compiling: '-nowarn -classpath .;C:\Program Files\Java\jre6\lib\ext\NetRexxC.jar;C:\Program Files\Ja va\jre6\lib\ext\tools.jar;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc .jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\PROGR A~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\Java\jre6\lib\ext\QTJava. zip;C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\NetRexxC.jar;C:\Documents and Se ttings\keklein\My Documents\REXX\NetRexx\bin;C:\Documents and Settings\keklein\My Documents\REXX\Net Rexx\nrxredbk.zip;C:\Program Files\Java\jdk1.6.0_18\jre\lib\alt-rt.jar;C:\Program Files\Java\jdk1.6. 0_18\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\deploy.jar;C:\Program Files\Java \jdk1.6.0_18\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\jce.jar;C:\Program Files\J ava\jdk1.6.0_18\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\management-agent.jar;C:\P rogram Files\Java\jdk1.6.0_18\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\resources .jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\ dnsns.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6. 0_18\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunmscapi.jar;C:\ Program Files\Java\jdk1.6.0_18\jre\lib\ext\sunpkcs11.jar -g C:\Documents and Settings\keklein\My Doc uments\REXX\NetRexx\bin\FrontEnd.java C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bi n\QandAgui.java' Compilation of 'FrontEnd.nrx' successful Compilation of 'QandAgui.nrx' successful [4 classes] C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > jar.exe -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.tx t "/Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" added manifest adding: Manifest.txt(in = 163) (out= 134)(deflated 17%) adding: FrontEnd.class(in = 14681) (out= 6340)(deflated 56%) adding: QandAgui.class(in = 18049) (out= 7604)(deflated 57%) adding: QandA.txt(in = 17079) (out= 3332)(deflated 80%) adding: TandF.txt(in = 14956) (out= 3700)(deflated 75%) adding: Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar(in = 352738) (out= 343255)(deflated 2%) C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin+ Tue 12/20/2011 10:01 > java -jar frontend.jar Exception in thread "main" java.lang.NoClassDefFoundError: netrexx/lang/Rexx at FrontEnd.<init>(FrontEnd.nrx:15) at FrontEnd.main(FrontEnd.nrx:20) Caused by: java.lang.ClassNotFoundException: netrexx.lang.Rexx at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more paths: "This is a nice list of your path at the moment:" . C:\Documents and Settings\keklein\ C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin C:\Documents and Settings\keklein\My Documents\REXX\NrxRedBk\Redbook C:\Program Files\vim\vim73 C:\PROGRA~1\IBM\SQLLIB\BIN C:\PROGRA~1\IBM\SQLLIB\FUNCTION C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL C:\Program Files\IBM\GSK7\bin C:\Program Files\IBM\GSK7\lib C:\Program Files\IBM\ITM\bin C:\Program Files\IBM\ITM\bin\dll C:\Program Files\IBM\ITM\InstallITM C:\Program Files\IBM\ITM\TMAITM6 C:\Program Files\IBM\Personal Communications\ C:\Program Files\IBM\Trace Facility\ C:\Program Files\Java\jdk1.6.0_18\bin C:\Program Files\QuickTime\QTSystem\ C:\program files\rmf\rmf spreadsheet reporter\ C:\Program Files\Windows Imaging\ C:\WINDOWS C:\WINDOWS\system32 C:\WINDOWS\System32\Wbem C:\Documents and Settings\keklein\My Documents\apache-ant-1.8.2\bin "This is a nice list of your classpath at the moment:" ". C:\Program Files\Java\jre6\lib\ext\NetRexxC.jar C:\Program Files\Java\jre6\lib\ext\tools.jar C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip C:\PROGRA~1\IBM\SQLLIB\java\db2jcc_license_cu.jar C:\PROGRA~1\IBM\SQLLIB\bin C:\PROGRA~1\IBM\SQLLIB\java\common.jar C:\Program Files\Java\jre6\lib\ext\QTJava.zip C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\Rexx2Nrx.jar C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\lib\NetRexxC.jar C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\bin\ C:\Documents and Settings\keklein\My Documents\REXX\NetRexx\nrxredbk.zip" Done. Manifest.txt: Class-Path: /Program Files/Java/jre6/lib/ext/NetRexxC.jar;/Documents and Settings/keklein/My Documents/REXX/NetRexx/lib/NetRexxR.jar Main-Class: FrontEnd Kenneth Klein Systems Specialist Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Kenneth:
you probably hit the 72 character maximum line-length of a manifest.txt file. If you need to do a line break then make sure that the first character on the continuation line is a blank. Cf. <http://docs.oracle.com/javase/1.4.2/docs/guide/jar/jar.html>. HTH, ---rony On 20.12.2011 18:40, [hidden email] wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
It likely doesn’t care for spaces in your classpath. Class-Path: "/Documents and Settings/k…./NetrexxR.jar” And you only need the runtime jar – NetrexxR.jar From: [hidden email] [mailto:[hidden email]]
On Behalf Of Rony G. Flatscher Kenneth:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by kenner
Hi! try this unzip NetRexxR.jar in Your "FrontEnd.class" dir. You get a netrexx/lang/...classfiles run jar: jar cfe frontend.jar FrontEnd FrontEnd.class QandAgui.class QandA.txt TandF.txt netrexx/lang/*.class You don't need to fix a manifest file as for some old java versions. Regards! > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" 20 dec 2011 kl. 16:21 skrev [hidden email]: > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Bravo! Joy, joy! It works. Apparently you can add a jar file to a jar file. BTW - I just used the netrexxR.jar files and the whole thing is only 65K even with my text files in the jar. Thank you, Janne Next on to making it an applet and making a package. Kenneth Klein Systems Specialist [hidden email]
Hi! try this unzip NetRexxR.jar in Your "FrontEnd.class" dir. You get a netrexx/lang/...classfiles run jar: jar cfe frontend.jar FrontEnd FrontEnd.class QandAgui.class QandA.txt TandF.txt netrexx/lang/*.class You don't need to fix a manifest file as for some old java versions. Regards! > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" 20 dec 2011 kl. 16:21 skrev kenneth.klein@...: > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I meant to type " apparently you can NOT add a jar to a jar" Kenneth Klein Systems Specialist [hidden email]
Bravo! Joy, joy! It works. Apparently you can add a jar file to a jar file. BTW - I just used the netrexxR.jar files and the whole thing is only 65K even with my text files in the jar. Thank you, Janne Next on to making it an applet and making a package. Kenneth Klein Systems Specialist [hidden email]
Hi! try this unzip NetRexxR.jar in Your "FrontEnd.class" dir. You get a netrexx/lang/...classfiles run jar: jar cfe frontend.jar FrontEnd FrontEnd.class QandAgui.class QandA.txt TandF.txt netrexx/lang/*.class You don't need to fix a manifest file as for some old java versions. Regards! > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" 20 dec 2011 kl. 16:21 skrev kenneth.klein@...: > jar -cfve frontend.jar FrontEnd Manifest.txt FrontEnd.class QandAgui.class QandA.txt TandF.txt "/ Documents and Settings/keklein/My Documents/REXX/Netrexx/lib/NetRexxC.jar" _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Hi Kenneth, One-Jar (http://one-jar.sourceforge.net/) will allow you to do what you want. It implements a custom classloader that does not have the restriction that prevents the loading of a jar from within a jar. Cheers, Dave From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
On Wed, Dec 21, 2011 at 18:32, Dave Woodman <[hidden email]> wrote:
At the risk of repeating myself, I will repeat myself: why hasn´t one-jar been made part of Java and the OpenJDK?. It´s such a useful tool that saves so much time and frustation, that it boggles the mind how nobody thought of approaching the developer and have it contributed to the official JDK code.
Happy holidays to you all... FC
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Tom,
One-Jar has come up more than once and, on the face of it, seems a very desirable approach. Have you evaluated it? I believe Dave has taken an in-depth look. On Wed, Dec 21, 2011 at 5:07 PM, Fernando Cassia <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
On 12/22/2011 1:59 PM, George Hovey wrote:
> One-Jar has come up more than once and, on the face of it, seems a > very desirable approach. Have you evaluated it? I believe Dave has > taken an in-depth look. > I have looked at it, more than once. I've even used it ... purely as a trial ... to send a Hello World (or some other silly program) to my brother. He was able to double click the JAR and run the program without any problem. However, I haven't gone beyond that initial toe in the water look-see. I simply don't do much packaging/distributing of applications these days. For the NetRexx installer, IzPack was René's suggestion and I've been fooling around with that. I confess that it has appeal, and there's even a GUI "wrapper" for it, PackJacket ... also under investigation. If pure delivery is the goal, OneJar is very suitable. If you need to tinker with environment variables, create directories, etc. then something beefier is required. Tom. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I have to agree with Tom - oneJar is not an installer, it provides a way to
consolidate multiple jars into one, and little more. If that sounds disparaging then that is unintentional - it is a good tool that solves a problem in an elegant and usable way. It is great to, for instance, package the NetRexx runtime with your code to make a stand alone application - it is not so useful if that application requires installation. Cheers, Dave. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Tom Maynard Sent: 22 December 2011 20:37 To: George Hovey; IBM Netrexx Subject: Re: [Ibm-netrexx] noclassdeffounderror when executing a new jar On 12/22/2011 1:59 PM, George Hovey wrote: > One-Jar has come up more than once and, on the face of it, seems a > very desirable approach. Have you evaluated it? I believe Dave has > taken an in-depth look. > I have looked at it, more than once. I've even used it ... purely as a trial ... to send a Hello World (or some other silly program) to my brother. He was able to double click the JAR and run the program without any problem. However, I haven't gone beyond that initial toe in the water look-see. I simply don't do much packaging/distributing of applications these days. For the NetRexx installer, IzPack was René's suggestion and I've been fooling around with that. I confess that it has appeal, and there's even a GUI "wrapper" for it, PackJacket ... also under investigation. If pure delivery is the goal, OneJar is very suitable. If you need to tinker with environment variables, create directories, etc. then something beefier is required. Tom. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by kenner
Hello Kenneth,
1.) Thanks for the sample 2.) What I would be really interested in is: Is the any (hidden) command in jar.exe to add one jar file to another (e.g. merge jar files) without unipping them ? Happy X-mas, anyway, to the whole group Thomas. =====================================================================. Am 21.12.2011 15:01, schrieb [hidden email]
--
Thomas Schneider (Founder of www.thsitc.com) Member of the Rexx Languge Asscociation (www.rexxla.org) Member of the NetRexx Developer's Team (www.netrexx.org) _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/
Thomas Schneider, Vienna, Austria (Europe) :-)
www.thsitc.com www.db-123.com |
Free forum by Nabble | Edit this page |