Re: cannot find org.postgres.Driver - Mailing list pgsql-jdbc

From Felipe
Subject Re: cannot find org.postgres.Driver
Date
Msg-id 20040526220611.32358.qmail@web50505.mail.yahoo.com
Whole thread Raw
In response to Re: cannot find org.postgres.Driver  (Ulrich Meis <kenobi@halifax.rwth-aachen.de>)
Responses Re: cannot find org.postgres.Driver
List pgsql-jdbc
I'm using the file pg73jdbc3.jar which is included in my classpath
 
well, my directory structure is:
 
/home/Documents/dbConnection/classes/dbconnection
here are all classes
 
and html file is in
/home/Documents/dbConnection/classes/
 
my source code is as follows
 
package dbconnection;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.sql.*;
 
public class Conectame1 extends JApplet {
 
//Construct the applet
public Conectame() {
}
 
//Initialize the applet
public void init() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
 
//Component initialization
private void jbInit() throws Exception, ClassNotFoundException, SQLException{
conexion esta = new conexion();
jLabel1.setText("database name: "+esta.db.getDatabaseProductName());
this.setSize(new Dimension(400,300));
this.getContentPane().add(jLabel1, BorderLayout.CENTER);
}
}
 
class conexion {
Connection db;
DatabaseMetaData dbmd;
public conexion() throws ClassNotFoundException, SQLException
{
Class.forName("org.postgresql.Driver");
db = DriverManager.getConnection("jdbc:postgresql:arl","pipo","jamara16");
dbmd = db.getMetaData();
}
public static void main(String[] args) throws SQLException, ClassNotFoundException
{
conexion conexion1 = new conexion();
}
}
 
my html code is as follows
html>
head>
title>
HTML Test Page
/title>
/head>
body>
dbconnection.Conectame will appear below in a Java enabled browser.<br>
applet
codebase = "."
code = "dbconnection.Conectame.class"
name = "TestApplet"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
>
/applet>
/body>
/html>
(I erased the '<' for my mail manager)
thanks for your answer
 



Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.

pgsql-jdbc by date:

Previous
From: Ceki Gulcu
Date:
Subject: Re: getGeneratedKeys method
Next
From: Oliver Jowett
Date:
Subject: Re: getGeneratedKeys method