| 
 | 
Ashish, here are some of the answers to your
questions:
Hope it helps you get started with Java programming in
the AS/400 - iSeries. I assume you already know the
AS/400:
If the JDK is properly setup in your iSeries, here's
the quickest way to check the Java version:
a. From the command line, type QSH
b. type java -version, you should see something like
this:
                           
  $                        
> java -version            
  java version "1.3.1"     
  $                        
                           
OR from the command line
a. type "go licpgm"
b. type 10 "Display installed licensed programs",
scroll/page down until you see something like this:
 5722JV1   *COMPATIBLE  Developer Kit for Java      
 5722JV1   *COMPATIBLE  Java Developer Kit 1.2      
 5722JV1   *COMPATIBLE  Java Developer Kit 1.1.8    
 5722JV1   *COMPATIBLE  Java Developer Kit 1.3      
 5722JV1   *COMPATIBLE  Java Developer Kit 1.4      
1. How can i develop java program on AS400 , i
would like to create programs in IFS some folder,
Start here, click on Programming, then click on
Java...
iSeries Information Center
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/index.htm
2. Setup CLASSPATH, 
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzaha/classpth.htm
3. call these java programs from RPG, refer to the
iSeries Information center for more info. on this.
*** Here's how we call the Java program from a CL ***
RUNJVA CLASS('JavaClassName') 
              CLASSPATH('/users/directory')  
4. Call Java program and create a JDBC Connection
object with out having the user to relogin, i.e. use
native JDBC driver
************************************
Here's the code snippet: More info./example in the
iSeries Information Center
************************************
// make sure you put this above with the other import
// statements
import com.ibm.db2.jdbc.app.*; 
// This is the code for the JDBC
// This is the connection info. for DB2 on the AS/400
sourceURLDB2 = "jdbc:db2://iseriesname";
Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
db2conn = DriverManager.getConnection(sourceURLDB2);
db2conn.setAutoCommit(false);
Statement stmtDB2 = db2conn.createStatement();
Call the Java JDBC objects just like any other objects
from platform(s).
Good luck,
Angelito
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.