RE: Unable to compile Java program in AS400

Rob Berendt <[email protected]> Thu, 14 Apr 2022 19:55:13 +0000
Newsgroups gmane.comp.lang.as400.java
Message-ID <CH0PR11MB52496AEAAF10B2A8BC3784ACA4EF9@CH0PR11MB5249.namprd11.prod.outlook.com>
What version of the OS?
IDK if you can get Java 8 to run on an AS400.  You might have to upgrade to IBM i.
If you do DSPSFWRSC what do you have in this vicinity?
Resource                                             
   ID     Option  Feature  Description               
5770JV1   *BASE    5050    IBM Developer Kit for Java
5770JV1   *BASE    2924    IBM Developer Kit for Java
5770JV1   16       5116    Java SE 8 32 bit          
5770JV1   17       5117    Java SE 8 64 bit          
5770JV1   19       5119    Java SE 11 64 bit         


Rob Berendt
-- 
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to:  7310 Innovation Blvd, Suite 104
          Ft. Wayne, IN 46818
Ship to:  7310 Innovation Blvd, Dock 9C
          Ft. Wayne, IN 46818
http://www.dekko.com

-----Original Message-----
From: JAVA400-L <java400-l-bounces-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org> On Behalf Of shaik rihana
Sent: Thursday, April 14, 2022 2:42 PM
To: [email protected]
Subject: Unable to compile Java program in AS400

[You don't often get email from shaikrihana7-Re5JQEeQqe9fmgfxC/sS/[email protected] Learn why this is important at http://aka.ms/LearnAboutSenderIdentification.]

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


  Hi Team,

I am trying to compile a java program in AS400, We have JDK 1.8 version
installed in our system. While compiling I am getting the below error.

> javac AWSV4Auth.java

  error: error reading /QIBM/UserData/Java400/ext/sqljdbc42.jar; error in
opening zip file

Tried to compile a simple HelloWorld program, but it is also not working.
 I have ENVVAR CLASSPATH set to '/QIBM/ProdData/Java400'

Secondly, I have a .class file created outside AS400 using a JDK version
1.8. I copied the .class to IFS folder '/QIBM/ProdData/Java400' . When I
try using functions from this class, am getting the below error

Message ID . . . . . . : RNQ0301 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 04/12/22 Time sent . . . . . . : 16:49:54

Message . . . . : Java exception received when calling Java method (C G D
F).
Cause . . . . . : RPG procedure JVAINT2 in program DEVRXS/JVAINT2 received
Java exception "java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major
version; class=AWSV4Auth, offset=6" when calling method "<init>" with
signature "()V" in class "AWSV4Auth".
Recovery . . . : Contact the person responsible for program maintenance to
determine the cause of the problem.
Possible choices for replying to message . . . . . . . . . . . . . . . :
D -- Obtain RPG formatted dump.
S -- Obtain system dump.
More...
Reply . . . : C

Please help me resolve this issue.



--
Regards,
Rihana S
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
-- 
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com