|
Pascal, When you create an environment variable, it defaults to *job. If you create your CLASSPATH var with *sys instead, it's always available. When you type wrkenvvar, press F4 and change it to *sys, and then continue as normal to create CLASSPATH with your path in it. I haven't run into any "gotchas" doing it this way, but I'm also fairly new at working with java on the as/400. Hope this helps, Mike -----Original Message----- From: Pascal Bellerose [mailto:pascal.bellerose@progisys.com] Sent: Wednesday, May 24, 2000 12:53 PM To: 'JAVA400-L@midrange.com' Subject: RE: Execution problems Do you think I can use the ENVVARs I've created in the classpath instead of typing each path evrytime i start a QShell session? -----Message d'origine----- De : Cummings, Wanda [mailto:Cummings@AE.com] Envoyé : mercredi 24 mai 2000 11:34 À : 'JAVA400-L@midrange.com' Objet : RE: Execution problems i had the same problem, i got this answer, and it worked. >> CLASSPATH=/QIBM/ProdData/Java400/lib/jdkptf.zip: >> /QIBM/ProdData/Java400/lib/java.zip: >> /QIBM/ProdData/Java400/lib/sun.zip: >> /QIBM/ProdData/Java400/com/ibm/db2/jdbc/app/db2_classes.zip: >> /QIBM/ProdData/Java400/: >> /myjava Your classpath does not include the Toolbox access classes. Add "/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar" to your classpath and you should be set. There are a couple of ways to do this. In your example you use the -classpath parm of the Java command. You can change that to "java -classpath /myjava:/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar ShowMeClas" or setup up the CLASSPATH environment variable once in QSHELL by entering command "export -s CLASSPATH= /myjava:/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar" Since you talk about QSHELL you must be running on the AS/400. Make sure the Toolbox container you use (jt400.jar or jt400Access.zip) has an associated Java program. This will make java programs run much faster. CRTJVAPGM CLSF('/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar') OPTIMIZE (30) David Wall AS/400 Toolbox for Java "Cummings, Wanda" <Cummings@AE.com> on 05/17/2000 08:29:37 AM > -----Original Message----- > From: Pascal Bellerose [SMTP:pascal.bellerose@progisys.com] > Sent: Wednesday, May 24, 2000 9:40 AM > To: 'java400-l@midrange.com' > Subject: Execution problems > > I can compile my Java Program using the javac command, but I get en error > message when I try to execute the class > > here's what I get when I compile under Qshell, where JVAOBJ is the > directory > of the object > > $ > > javac JVAOBJ/hello.java > $ > > now here what I get when I execute the class under QShell > > > java hello > java.lang.NoClassDefFoundError: hello > $ > > java JVAOBJ.hello > java.lang.NoClassDefFoundError: JVAOBJ/hello > $ > > I have a link created under "AS400JT" to the directory that contains the > jt400.jar file, > And I have created an environment variable named AS400JT that specify the > jt400.jar file in the AS400JT directory. > > Here the ENVVAR Value : > > Name . . . . . . . . . : AS400JT > > > Value . . . . . . . . . : 'AS400JT/jt400.jar' > > I know there is something wrong or missing in this procedure, and begging > for your help, I must get this Java thing to work so I can give the white > card to the development team. > > Thanks to you ! > > > > Pascal Bellerose > Programmeur analyste > pascal.bellerose@progisys.com > > PROGISYS inc. > Téléphone / Telephone : (418) 871-4880 > Télécopieur / Fax : (418) 871-0486 > Site internet / Website : www.PROGISYS.com > Courriel / E-mail : progisys@progisys.com > > > +--- > | This is the JAVA/400 Mailing List! > | To submit a new message, send your mail to JAVA400-L@midrange.com. > | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > JAVA400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner: joe@zappie.net > +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.