× 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.




Hi James,

Java 6 programs should run fine under 1.5, assuming no new API usage. Are you still getting the java.lang.UnsupportedClassVersionError? I wouldn't expect it.

For specific versions, you use the JAVA_HOME variable or set a specific version in the system property java.version. See:

http://www-304.ibm.com/support/docview.wss?uid=nas1699c5bd1f701d04e862568f1006c7483

or Google for more info. Again, from what you've said now, I don't think that JDK 1.5 is the problem, although that's what java.lang.UnsupportedClassVersionError means.

If you're getting java.lang.NoClassDefFoundError instead, in QShell, just change to the directory where Test18jn2012.class resides and use java JAVA Test18jn2012. When classpath is not set explicitly, the current directory is the default, and you've said you are already getting JDK 1.5.


Joe Sam

Joe Sam Shirah - www.conceptgo.com (904) 302-6870
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: www.ibm.com/developerworks/java/
Just the JDBC FAQs: www.jguru.com/faq/JDBC
Going International? www.jguru.com/faq/I18N
Que Java400? www.jguru.com/faq/Java400


-----Original Message----- From: James Lampert
Sent: Monday, June 18, 2012 4:39 PM
To: Java Programming on and around the IBM i
Subject: Re: Simple test Java app runs fine under Eclipse,and from a WinDozecommand line, but fails on the 400.

Joe Sam Shirah wrote:

As David mentioned, first make sure you're using binary mode for FTP.
That's just a checkoff item.

If so, look at the error message: java.lang.UnsupportedClassVersionError

At JDK 1.5, changes were made to the binary format and previous JVM's
won't run the program. That's what it sounds like. Run java -version (
actually JAVA *VERSION on the AS/400 ) to see what version you're using. If
below 1.5, you'll need to recompile with a pre 1.5 version or make sure
you're running a 1.5+ version.

It's very specifically a Java 1.6 program, and when I do a java -version
from QSH, it goes for the 1.5.

How do I tell it to specifically go for the 1.6 JVM?

--
JHHL

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.