If you put -version in your java command line, it'll show you the version that is loaded. If you put -showversion it'll show you and continue to run your class or jar.
The only reliable way to get the version you want loaded is to set the JAVA_HOME environment variable before calling the java command. -D sets a system property which is not quite the same thing. Different versions of the OS have handled java version loading differently.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Peter Clifford
Sent: Thursday, October 28, 2010 12:56 PM
To: java400-l@xxxxxxxxxxxx
Subject: Re: java.lang.NoClassDefFoundError
Thanks for your comments.
Here is what is showing as installed:
5722JC1 *COMPATIBLE Toolbox for Java
5722JV1 *COMPATIBLE Developer Kit for Java
5722JV1 *COMPATIBLE Java Developer Kit 1.3
5722JV1 *INSTALLED Java Developer Kit 1.5
I'm setting the options to include: -Djava.version=1.5
Does that help?
Pete
"Dan Kimmel" <dkimmel@xxxxxxxxxxxxxxx> wrote in message
news:mailman.10703.1288286780.2702.java400-l@xxxxxxxxxxxxxxx
JDK 1.4.2 is available for V5R3 via PTF.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Gary L Peskin
Sent: Thursday, October 28, 2010 11:59 AM
To: 'Java Programming on and around the IBM i'
Subject: RE: java.lang.NoClassDefFoundError
What version of the JDK are you running on V5R3M0 versus the other platforms? PBEKeySpec was introduced in 1.4.
-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-
bounces@xxxxxxxxxxxx] On Behalf Of Peter Clifford
Sent: Thursday, October 28, 2010 9:02 AM
To: java400-l@xxxxxxxxxxxx
Subject: java.lang.NoClassDefFoundError
This is probably a dumb question, but please humor me.
I'm getting "java.lang.NoClassDefFoundError:
javax/crypto/spec/PBEKeySpec"
when trying to apply a digital signature to a PDF using iText.
This is on V5R3M0. The same code works fine on V5R4M0, V6R1M0 and
V7R1M0.
I'm pretty sure it not a case of java not finding the class, more one
of the interface being wrong. Anyone know if this class has changed
between OS/400 releases and/or versions of java?
If anyone can point me in the right direction, it would be greatly
appreciated.
Pete
--
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.
--
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.
--
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.