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 4D4BC3A1A8D for ; Tue, 18 Jan 2005 15:59:14 +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 29990-10 for ; Tue, 18 Jan 2005 15:59:00 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by svr1.postgresql.org (Postfix) with ESMTP id 835773A1A76 for ; Tue, 18 Jan 2005 15:59:04 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 67so1065453wri for ; Tue, 18 Jan 2005 07:59:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:disposition-notification-to:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=LmrCtlfB81dV/7NK/s9QWq/YTXu31h9QakVhAe4c+hDhj92X3ZdkJTKnBdoVynrSHoMlJyKVUK0aX3e7eTJP2A6LTrUtpdWkuksiCm4FqtioGUMWlcoTuMkrdeyqM8QZpnYNsygtanOen4ioPVCAgfB+z0BJg78xBQo/C3wAS/o= Received: by 10.54.46.44 with SMTP id t44mr381658wrt; Tue, 18 Jan 2005 07:59:03 -0800 (PST) Received: from ?192.168.1.99? ([221.225.154.78]) by smtp.gmail.com with ESMTP id 34sm2818wra.2005.01.18.07.59.00; Tue, 18 Jan 2005 07:59:03 -0800 (PST) Message-ID: <41ED323E.3090101@gmail.com> Date: Tue, 18 Jan 2005 23:58:54 +0800 From: William Lai User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Becerra Lagos Ana Lilian Cc: pgsql-jdbc@postgresql.org Subject: Re: java.lang.NoClassDefFoundError References: <3A568BC085A5794983C7118F1A27CDEC2C7E79@epmarexc03.Entelpcs.Entelcorp.com> In-Reply-To: <3A568BC085A5794983C7118F1A27CDEC2C7E79@epmarexc03.Entelpcs.Entelcorp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200501/180 X-Sequence-Number: 12060 Please double-check the your jar filename, is pg73jdbc.jar or pg73jdbc3.jar? Becerra Lagos Ana Lilian wrote: >But now >I get > >C:\j2sdk1.4.1_07\bin>java -classpath c:\j2sdk1.4.1_07\lib\pg73jdbc.jar;. Example >2 >Checking if Driver is registered with DriverManager. >Couldn't find the driver! >Let's print a stack trace, and exit. >java.lang.ClassNotFoundException: org.postgresql.Driver > at java.net.URLClassLoader$1.run(URLClassLoader.java:198) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:186) > at java.lang.ClassLoader.loadClass(ClassLoader.java:299) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272) > at java.lang.ClassLoader.loadClass(ClassLoader.java:255) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:140) > at Example2.main(Example2.java:10) > >:( > > > >-----Mensaje original----- >De: William Lai [mailto:wlai2768@gmail.com] >Enviado el: Martes, 18 de Enero de 2005 12:25 >Para: Becerra Lagos Ana Lilian >CC: pgsql-jdbc@postgresql.org >Asunto: Re: [JDBC] java.lang.NoClassDefFoundError > >Hi, > >Did you try, > >java -classpath c:\path\to\pg73jdbc3.jar;. Example2 > >Have a nice day, >William > >Becerra Lagos Ana Lilian wrote: > > > >>Hi, >> >> >> >>Could you help me in my program JAVA with jdbc Postgre >> >>I have my simple code >> >> >> >>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."); >> >> >> >> 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 >> >>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 >>y puede contener informaci�n confidencial o privilegiada. >>Si usted recibi� este correo por error, por favor notificar >>inmediatamente >>al emisor y elimine el correo original. Cualquier otro uso de este correo >>esta prohibido. >> >>****************************************************************************************************** >> >> >>This message is for the designated recipient only and may contain >>privileged or >>confidential information. If you have received it in error, please >>notify the sender >>immediately and delete the original. Any other use of the email is >>prohibited. >> >> >Este correo es dirigido solo a las personas que aparecen como destinatarios >y puede contener informaci�n confidencial o privilegiada. >Si usted recibi� este correo por error, por favor notificar inmediatamente >al emisor y elimine el correo original. Cualquier otro uso de este correo >esta prohibido. > >****************************************************************************************************** > >This message is for the designated recipient only and may contain privileged or >confidential information. If you have received it in error, please notify the sender >immediately and delete the original. Any other use of the email is prohibited. > > >