HELLLO !
I think it's the best that I send the application I use.
It's an application from Sun's Java-Tutorial for trying
out and to learn. Compiling is no problem, only to execute
the application is not possible, I always
get the message that the driver cannot be found.
The 'jar.'-DriverFile is located in my Java-directory under
jre/lib/ext.
Well, I think this is really hard stuff !!!
I talked with some people about this problem, but until now
nobody could help me ...
Any help or ideas you have is welcome !
I thank you !
Greetings, Jobst ;-)
import java.sql.*;
public class CreateCoffees {
public static void main(
String args[]) {
String url = "jdbc:z1MySQL:myDataSource";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME varchar(32), " +
"SUP_ID int, " +
"PRICE float, " +
"SALES int, " +
"TOTAL int)";
Statement stmt;
try {
Class.forName("twz1.mysql.jdbcMysqlDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection
(url, "myLogin", "myPassword");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println
("SQLException: " + ex.getMessage());
}
}
}