|
> If I call it as: > java test01 > > I get: > I like spam! > java.lang.NoClassDefFoundError: com/ibm/as400/access/AS400 > test01.main([Ljava/lang/String;)V+8 (test03.java:5) In this instance, the implied classpath is the current working directory - since test01 is there it gets loaded, but jt400.jar isn't in the current directory the JVM fails to find and load it > > If I call it as: > java -classpath /QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar test01 > > I get: > Attaching Java program to > /QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar. > java.lang.NoClassDefFoundError: test01 > In this instance, you've specifically specified the classpath, but - for reasons only known to Sun - in specifying it, the JVM no longer implies the current working directory is in the classpath; so you have specify both. What you will need is; java -classpath /QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar;.; test01 Note, however I can't remember if the iSeries' path delimiter is ';' or ':' so it might not be ;.; at the end of the classpath directive, but :.: instead. Anyhow, *one* of them will do it. --phil
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.