X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9B3263A19D4 for ; Tue, 18 Jan 2005 16:01:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30882-06 for ; Tue, 18 Jan 2005 16:01:31 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id A83103A1AB1 for ; Tue, 18 Jan 2005 16:01:31 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j0IG1VkD033960 for ; Tue, 18 Jan 2005 16:01:31 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j0IFjiZJ030818 for pgsql-jdbc@postgresql.org; Tue, 18 Jan 2005 15:45:44 GMT (envelope-from news) From: "Nico" X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: java.lang.NoClassDefFoundError Date: Tue, 18 Jan 2005 16:45:51 +0100 Organization: Hub.Org Networking Services Lines: 381 Message-ID: References: <3A568BC085A5794983C7118F1A27CDEC2C7C40@epmarexc03.Entelpcs.Entelcorp.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0012_01C4FD7D.2B4F8EB0" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 To: pgsql-jdbc@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.722 tagged_above=0 required=5 tests=ALL_TRUSTED, AWL, FORGED_YAHOO_RCVD, HTML_MESSAGE, PRIORITY_NO_NAME X-Spam-Level: X-Archive-Number: 200501/182 X-Sequence-Number: 12062 This is a multi-part message in MIME format. ------=_NextPart_000_0012_01C4FD7D.2B4F8EB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable It didn't work for me either. When I put the jar file in my classes = directory, it did work. ""Becerra Lagos Ana Lilian"" schreef in = bericht = news:3A568BC085A5794983C7118F1A27CDEC2C7C40@epmarexc03.Entelpcs.Entelcorp= .com... Hi, Could you help me in my program JAVA with jdbc Postgre I have my simple code=20 import java.sql.DriverManager; import java.sql.Connection; import java.sql.SQLException; public class Example2 { public static void main(String[] argv) { System.out.println("Checking if Driver is registered with = DriverManager."); =20 try { Class.forName("org.postgresql.Driver"); } catch (ClassNotFoundException cnfe) { System.out.println("Couldn't find the driver!"); System.out.println("Let's print a stack trace, and exit."); cnfe.printStackTrace(); System.exit(1); } } } Then I execute : javac Example2.java Then I execute java Example2 but I get Exception in thread "main" java.lang.NoClassDefFoundError: Example Wich is my error ? I copied pg73jdbc3.jar in my path=20 C:\j2sdk1.4.1_07\lib\ Its have org.postgresql.Driver Thanks advanted ana Este correo es dirigido solo a las personas que aparecen como = destinatarios=20 y puede contener informaci=F3n confidencial o privilegiada. Si usted recibi=F3 este correo por error, por favor notificar = inmediatamente=20 al emisor y elimine el correo original. Cualquier otro uso de este = correo=20 esta prohibido.=20 = *************************************************************************= *****************************=20 This message is for the designated recipient only and may contain = privileged or=20 confidential information. If you have received it in error, please = notify the sender=20 immediately and delete the original. Any other use of the email is = prohibited.=20 ------=_NextPart_000_0012_01C4FD7D.2B4F8EB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
It didn't work for me either. When I = put the jar=20 file in my classes directory, it did work.
""Becerra Lagos Ana Lilian"" <exabecerra@nt.entel.cl> = schreef in=20 bericht news:3A568BC085A5794983C7118F1A27CDEC2C7C40@epmarexc03.Ente= lpcs.Entelcorp.com...

Hi,

Could you help me in my = program=20 JAVA with jdbc Postgre

I have my=20 simple code

import=20 java.sql.DriverManager;

import=20 java.sql.Connection;

import=20 java.sql.SQLException;

public class = Example2=20 {

  public = static void=20 main(String[] argv) {

 =20 System.out.println("Checking if Driver is registered with=20 DriverManager.");

 =20

  try=20 {

   =20 Class.forName("org.postgresql.Driver");

  } catch=20 (ClassNotFoundException cnfe) {

   =20 System.out.println("Couldn't find the = driver!");

   =20 System.out.println("Let's print a stack trace, and=20 exit.");

   =20 cnfe.printStackTrace();

   =20 System.exit(1);

 =20 }

 =20 }

 }

Then I execute=20 :

javac=20 Example2.java

Then I=20 execute

           = =20 java Example2

but I=20 get

Exception in thread = "main"=20 java.lang.NoClassDefFoundError: Example

Wich is my error=20 ?

I copied pg73jdbc3.jar =  in my=20 path

C:\j2sdk1.4.1_07\lib\

Its have = org.postgresql.Driver

Thanks=20 advanted

ana

Este correo es = dirigido=20 solo a las personas que aparecen como destinatarios
y puede = contener=20 informaci=F3n confidencial o privilegiada.
Si usted recibi=F3 este = correo por=20 error, por favor notificar inmediatamente
al emisor y elimine el = correo=20 original. Cualquier otro uso de este correo
esta prohibido.=20 =

*****************************************************************= *************************************=20

This message is for the designated recipient only and may = contain=20 privileged or
confidential information. If you have received it in = error,=20 please notify the sender
immediately and delete the original. Any = other=20 use of the email is prohibited.
------=_NextPart_000_0012_01C4FD7D.2B4F8EB0--