From: | Felipe <pipojmr(at)yahoo(dot)com(dot)mx> |
---|---|
To: | Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: cannot find org.postgres.Driver |
Date: | 2004-05-26 22:06:11 |
Message-ID: | 20040526220611.32358.qmail@web50505.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-05-27 02:06:10 | Re: getGeneratedKeys method |
Previous Message | Ceki Gulcu | 2004-05-26 16:27:51 | Re: getGeneratedKeys method |