Re: cannot find org.postgres.Driver

Поиск
Список
Период
Сортировка
От Felipe
Тема Re: cannot find org.postgres.Driver
Дата
Msg-id 20040526220611.32358.qmail@web50505.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: cannot find org.postgres.Driver  (Ulrich Meis <kenobi@halifax.rwth-aachen.de>)
Ответы Re: cannot find org.postgres.Driver
Список 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 по дате отправления:

Предыдущее
От: Ceki Gulcu
Дата:
Сообщение: Re: getGeneratedKeys method
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: getGeneratedKeys method