RE: [suse-programming-e] Understanding JDBC to Adabas D
Class.forName(driver_class) is the standard way to load the driver. But no matter where you put the jar whith the driver, you always have to add the path(jar included) to your classpath. When you run the application: java -classpath /usr/sag/aad/v1201/lib/adabasd.jar:.:other_jars_and_path myapp -----Mensaje original----- De: Prabu Subroto [mailto:prabu_subroto@yahoo.com] Enviado el: Monday, June 30, 2003 4:22 PM Para: Suse Programming Milis Asunto: [suse-programming-e] Understanding JDBC to Adabas D Dear my friends... I found this codes in the "internet guide" of Adabas D for doing the connection with JDBC to Adabas D : === import java.sql.*; public class konek { public static void main(String[] args) { System.out.println("Hallo Indonesia"); try { Class.forName("de.sag.jdbc.adabasd.aDriver"); } catch (ClassNotFoundException e){ system.out.println("JDBC driver for Adabas D not found"); }; try { java.sql.Connection con = java.sql.DriverManager.getConnection("jdbc:adabasd://susefujitsu/prabusoft", "control", "duisburg"); } catch (java.sql.SQLException e) { system.out.println("Error " + e.getErrorCode() + " " + e.getMessage()); } } } === I put my JDBC driver under "/usr/sag/aad/v1201/lib/adabasd.jar". I don't understand this line : " Class.forName("de.sag.jdbc.adabasd.aDriver"); " Is it different on my my case? I mean, how should I do it on my case? Is there no difference? Where should I define the location of my JDBC Driver? and should I load it? Sorry pal, I am absolutely new in JDBC. --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
participants (1)
-
Gustavo Dutra