| 
 | 
I don't have much experience with AppletViewer, but it seems to ignore the
local classpath.  My setup is:
HTTP Server is my AS/400
HTTP Server configured to share all files in my directory on the AS/400
.HTML file contains only:
     <HTML>
     <body>
     <applet code="test.JDDriverTest.class" width=700 height=500></applet>
     </body>
     <html>
Test 1:
     CLASSPATH=c:\jt400\lib\jt400.jar
     AS/400 has .html
     AS/400 has testcase .class files in a directory called "test"
     appletViewer http://myAS400/mydir/JDDriverTest.html
     I get classdef not found
Test 2:
     CLASSPATH=nothing
     AS/400 has .html
     AS/400 has test .class files in a directory called "test"
     AS/400 has Toolbox .class files
     appletViewer http://myAS400/mydir/JDDriverTest.html
     Applet works
If my PC's classpath were used by applet viewer, test 1 should have worked.
Since it didn't but test 2 worked at least there is a way to test by having
all files on the HTTP server (an AS/400 in my case).  Since I am on a local
lan, the performance of downloading the .class files off the AS/400 was
acceptable.  I should have also tried another test where I put the Toolbox
and testcases into a jar, and reference that jar on the applet tag (the jar
would have to be on the AS/400).  That should work as well (but is left as
an exercise for the reader :->).
I hope this is enough to get you going,
David Wall
AS/400 Toolbox for Java
tmalin@hannasteel.com@midrange.com on 01/02/2001 01:35:31 PM
Please respond to JAVA400-L@midrange.com
Sent by:  owner-java400-l@midrange.com
To:   JAVA400-L@midrange.com
cc:
Subject:  What is the suitable JDBC Driver for an Applet to connect to an
      AS/400 !@!!@
I have my class path set up and I can access the AS/400 via a dos prompt
call to a Java app. The Java app uses the AS/400 toolbox JDBC driver and
display the records on the screen. I am having difficulty accessing the
AS/400 via appletviewer. I am using the AS/400 toolbox JDBC driver, but I
still get the no suitable driver error.
not all my code just a snippet()
import java.net.URL;
import java.awt.*;
import java.applet.Applet;
import java.sql.*;
import com.ibm.as400.access.*;
// begin the applet ********************************************
public class Dbf extends java.applet.Applet
{
Button DBFConnect = new Button("Connect to AS/400");
TextField QueryField = new TextField(40);
TextArea OutputField = new TextArea(10,95);
Connection con ;
static {
  try{
    //java.sql.DriverManager.registerDriver(new
com.ibm.as400.access.AS400JDBCDriver()); // will not work!!!
     Class.forName("com.ibm.as400.access.AS400JDBCDriver");
     }catch(ClassNotFoundException e)
     { e.printStackTrace(); }
    } // end static
String system = "HOST";
String url = "jdbc:as400://" + system;
String Name = "USER";
String Password = "PASSWORD";
public void init()
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---
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.