|
NoClassDefFoundError means a class or something it refers to cannot be found. http://java.sun.com/j2se/1.3/docs/api/index.html http://java.sun.com/j2se/1.3/docs/api/java/lang/NoClassDefFoundError.html Yes, it has something to do with your classpath. You never really told us how you tried to run it so its hard to say what you're doing wrong. CLASSPATH is exactly similar in concept to PATH on Windows or UNIX. Its used to find all your java classes. From CL command line try: ADDENVVAR CLASSPATH '/myjava/bud' JAVA CLASS(TestListing) If it still doesn't work, its likely not finding a class that TestListing is using. Try the OPTION(*VERBOSE) option and look for your classes and where they are loaded from. "The stuff we call "software" is not like anything that human society is used to thinking about. Software is something like a machine, and something like mathematics, and something like language, and something like thought, and art, and information... but software is not in fact any of those other things." Bruce Sterling - The Hacker Crackdown Fred A. Kulack - AS/400e Java and Java DB2 access, Jdbc, JTA, etc... IBM in Rochester, MN (Phone: 507.253.5982 T/L 553-5982) mailto:kulack@us.ibm.com Personal: mailto:kulack@bresnanlink.net AOL Instant Messenger: Home:FKulack Work:FKulackWrk "Tom Tufankjian" <Tom_Tufankjian@hbltd.com>@midrange.com on 03/02/2001 08:46:55 AM Please respond to JAVA400-L@midrange.com Sent by: owner-java400-l@midrange.com To: JAVA400-L@midrange.com cc: Subject: Newbee problem running java program I am very new at java and I've written a program that works in the Visual Age environment. However when I export my .class and .java files to a folder on the IFS and attempt to run the program on the AS400, I get the following: java.lang.NoClassDefFoundError: TestListing java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:81) Java program completed with exit code 1 1. Where can I find out what this means? 2. Does it have something to do with classpath? I am very weak in this area. 3. How can I fix this problem? The folder on the IFS is /myjava/bud. Bud is the package name and it's referenced in the classes. The classes are TestListing and PrintTheReport. TestListing just creates an instance of PrintTheReport to run it. What the program does is to read a file on the AS400 and print a listing of it on System.out. Nothing fancy. Any help will be greatly appreciated! Thanks! +--- | 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.