× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Have you tried putting the classpath in single quotes?

Gary

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of John Allen
Sent: Wednesday, August 14, 2013 8:25 AM
To: 'Java Programming on and around the IBM i'
Subject: RUNJAVA not loading classes

I need 2nd set of eyes to see what I am doing wrong.

I am trying to use RUNJAVA to run my java class, (it works fine using QSHELL
JAVA with exact same classpath)

Running
IBM i 6.1
Java version from java *version is:
java version "1.5.0"

Java(TM) 2 Runtime Environment, Standard Edition (build
pap32dev-20111020 (SR13 ))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 OS/400 ppc-32
j9vmap3223sr13-20111020 (JIT enabled)
J9VM - 20111017_92807_bHdSMr

JIT - 20110916_20782_r8

GC - 20110524_AA)

JCL - 20111019

Java program completed


I am not setting ENVVAR CLASSPATH I am specifying the classpath at program
execution

The classpath definition:
CLASSPATH(/drv/javaapp/itext.jar:/drv/javaapp:/drv/javaapp/s
fapdfenc.jar:)


When I run RUNJAVA using OPTION(*VERBOSE) (Use *VERBOSE to see the classes
loaded) I see it loading a bunch of classes then encounters the error below
It never loads any classes from either jar file I get error (see below)

Everything is in the the IFS directory /drv/javaapp WRKLNK '/drv/javaapp'
Results:
Directory...: /drv/javaapp
.
..
itext.jar
sfapdfen.class
sfapdfenc.jar
TESTINPUT.PDF
TESTOUT.PDF
I use winzip to verify there are classes in both jar files

Results of RUNJAVA with OPTION(*VERBOSE):

...
class load: java/security/ProtectionDomain$Key

class load: java/security/Principal

class load: sfapdfen from: file:/DRV/JAVAAPP/

class load: java/lang/NoClassDefFoundError

Exception in thread "main" java.lang.NoClassDefFoundError:
com.lowagie.text.pdf.PdfReader
at java.lang.J9VMInternals.verifyImpl(Native Method)

at
java.lang.J9VMInternals.verify(J9VMInternals.java:69)

at
java.lang.J9VMInternals.initialize(J9VMInternals.java:131)

Caused by: java.lang.ClassNotFoundException:
com.lowagie.text.pdf.PdfReader
at
java.net.URLClassLoader.findClass(URLClassLoader.java:498)

at
java.lang.ClassLoader.loadClass(ClassLoader.java:650)

at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349
)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:616)

... 3 more

class load: java/util/AbstractList$Itr

class load: java/util/IdentityHashMap$KeySet

class load:
java/util/IdentityHashMap$IdentityHashMapIterator

Thanks

John


--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.