Another Question About How To Use PointBase Dbms

hi all,

another question is about PointBase DataBase.

I use the following source to test it. It comiles correctly,but when i test it with an argument of database name. JVM tell me that ClassDefNotFound.

It seems that JVM can not find "com.pointbase.jdbc.jdbcDriver" as the documentation told.I have set path and i use jdk1.2.2.

Can you tell why?

import java.net.URL;

import java.sql.*;

import java.util.*;

class testdb{

public static void main(String args[]){

String url,user,pwd;

if(args.length==0)

{

System.out.println("Forger Data Source");

System.out.println("Use DB");

System.exit(0);

}

url="jdbc:pointbase:"+args[0];

if(args.length>1){

user=args[1];}

else

{user="";

}

if(args.length>2){

pwd=args[2];}

else

{

pwd="";}

try

{

Class.forName("com.pointbase.jdbc.jdbcDriver");

Connection con=DriverManager.getConnection(url,user,pwd);

DatabaseMetaData dd=con.getMetaData();

System.out.println("Data Source URL:"+dd.getURL());

System.out.println("Driver Name:"+dd.getDriverName());

System.out.println("Driver Version:"+dd.getDriverVersion());

System.out.println("Database Product Name:"+dd.getDatabaseProductName());

System.out.println("Database Product Version:"+dd.getDatabaseProductVersion());

con.close();

}

catch(Exception ex){

System.out.println(ex.getMessage());

ex.printStackTrace();

}

}

}

[1594 byte] By [javanewcomer] at [2007-9-26 4:25:01]
# 1
does the pointbase db driver come with the jdk?if not the pointbase driver will be a jar archive. you have to add the archives name to the classpath or rename the jar to zip and extract it into your lib dir (java-path/lib/com/pointbase/jdbc/......). hans.
hraber at 2007-6-29 17:32:38 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...