Well I've been trying to get this figured out on my own. No success. Before trying to move this to its ultimate destination, I have Exported my package to a folder on my C drive. C:\IseriesJava. I have another folder on my C drive that contains JT400.jar. This is C:\JDBCDrivers I have added this to my classpath by trying both of the following Set classpath=C:\JDBCDrivers and Set Claspath=C:\JDBCDrivers\jt400.jar I have tried copying jt400.jar to my folder C:\IseriesJava Nothing I have tried is giving me success. The program is trying to run. I get a connection to my access driver. Then I get the following error java.lang.ClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver If I understand correctly, this means that it cannot find the JT400.jar What am I missing here? Michael Smith iSeries.mySeries. -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta Sent: Tuesday, September 26, 2006 9:38 AM To: 'Java Programming on and around the iSeries / AS400' Subject: RE: Running java on Iseries
From: Smith, Mike This java program has 2 ODBC connections. 1 to the ACCESS database using. String driver = "sun.jdbc.odbc.JdbcOdbcDriver"; String url = "jdbc:odbc:AcsData"; The connection to the Iseries is String driver = "com.ibm.as400.access.AS400JDBCDriver"; As I read the records I write them to an file on the Iseries.
I just snipped out the relevant bits, Mike. This is a perfectly valid design; I've used it in the past to transfer data from a Windows machine to an iSeries. The only thing is that, as you have discovered, it really has to run on the Windows machine (that's because there's no native iSeries driver to handle the "jdbc:odbc:AcsData" connection). So, that being the case, you create a simple batch file on the Windows box to run the command with the appropriate classpath and all those goodies. Then you use RUNRMTCMD to execute this command from the iSeries. A couple of security issues. First, you have to run "rexec" (IIRC) on the Windows box. This allows people to execute commands on that machine over the Internet (which is exactly what you're trying to accomplish). I'm not an expert at locking that down to make sure bad people can't do bad things on the machine. Second, in order to use the toolbox from a Windows machine you will need a user ID and password embedded in your Java program or you'll have to pass it in on the call. If your SOX auditors ever saw that, they'd probably have a fit, especially if you allow people to execute commands on the machine via rexec! I'd suggest creating a special user profile that only has access to a single library and that library contains just the file used to upload data from the PC. That way if someone gets that password, they can't do much. Joe
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.