|
hi Nick,
Nick Arndt wrote:
I now can find my class, but it gives me a
java.lang.UnsupportedClassVersionError
This means that the version of Java the class was compiled for isn't
compatible with the version of the JVM you're trying to run it on. For
example, if you compiled it for version 1.4, it may not run on a 1.1.8
JVM since the 1.4 version might be using functionality that was not
available in 1.1.8.
I'd start by determining which versions of Java are installed on your
machine. GO LICPGM option 10 should tell you that (you may have to
scroll down... look for the 57xxJV1 entries)
If you have more than one installed, you may need to control which one
gets started. Please be aware that the version reported in QShell when
running "java -version" is not necessarily the same one that RPG decides
to use. I'm not sure why that's the case, but they're not always the same.
You can control which version of the JVM gets run using the
QIBM_RPG_JAVA_PROPERTIES environment variable. Something like this
might work:
ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) VALUE('-Djava.version=1.4;')
In this case, I'm instructing RPG to load version 1.4 of the JVM. Note
that you have to specify -Djava.version=1.5 (not 5.0) in order to get
Java 5.0 to load. Sun used the number 1.5 internally, but marketed the
product under the moniker "5.0"... which is a little confusing... but,
rest assured that -Djava.version=1.5 will give you version 5.0. (I
haven't tried it, but I believe the same is true for 6.0, you have to
specify version=1.6)
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.