X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DCE509FA2FA for ; Wed, 10 May 2006 09:52:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 90099-10 for ; Wed, 10 May 2006 09:52:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.jay.net (mail.jay.net [81.19.224.84]) by postgresql.org (Postfix) with ESMTP id 56A5B9FA1B0 for ; Wed, 10 May 2006 09:52:35 -0300 (ADT) Received: (qmail 18355 invoked by uid 509); 10 May 2006 12:52:33 -0000 Received: from 81.7.181.42 by mail.jay.net (envelope-from , uid 502) with qmail-scanner-1.24st (clamdscan: 0.87.1/635. spamassassin: 3.1.1 perlscan: 1.24st. Clear:RC:1(81.7.181.42):. Processed in 0.064455 secs); 10 May 2006 12:52:33 -0000 Received: from unknown (HELO server002.befree.dk) ([81.7.181.42]) (envelope-sender ) by mail.jay.net (qmail-ldap-1.03) with SMTP for ; 10 May 2006 12:52:33 -0000 Received: from [192.168.1.12] ([80.62.40.30]RDNS failed) by server002.befree.dk with InterScan Messaging Security Suite; Wed, 10 May 2006 14:52:30 +0200 Message-ID: <4461E138.3060000@timmy.dk> Date: Wed, 10 May 2006 14:48:56 +0200 From: "Mads N. Vestergaard" User-Agent: Thunderbird 1.5.0.2 (X11/20060504) MIME-Version: 1.0 To: MAIGNAN Luc CC: pgsql-jdbc@postgresql.org Subject: Re: Problem loading driver References: <6CF6C2B015865B44B7752C9420D0D71602C147FF@exc2003.int.fininfo.gr p> In-Reply-To: <6CF6C2B015865B44B7752C9420D0D71602C147FF@exc2003.int.fininfo.g rp> Content-Type: multipart/alternative; boundary=------------000308070003080605030407 X-imss-version: 2.038 X-imss-result: Passed X-imss-approveListMatch: *@timmy.dk X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/28 X-Sequence-Number: 15156 This is a multi-part message in MIME format. --------------000308070003080605030407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi Maignan, man java, will tell you what the -cp does.... " -classpath classpath -cp classpath Specifies a list of directories, JAR archives, and ZIP arc= hives to search for class files. Class path entries are separat= ed by colons (:). Specifying -classpath or -cp overrides any se= tting of the CLASSPATH environment variable. If -classpath and -cp are not used and CLASSPATH is not set= , the user class path consists of the current directory (.)." Also please keep all mails on-list. Try it, as Dave mentioned it probably is a problem with your CLASSPATH. Try to give us the ouput of `echo $CLASSPATH`. MAIGNAN Luc wrote: > No I just do :=20 > > java MyClass > > What does the -cp do ? > > -----Message d'origine----- > De : Mads N. Vestergaard [mailto:mnv@timmy.dk] > Envoy=E9 : mercredi 10 mai 2006 14:04 > =C0 : MAIGNAN Luc > Cc : pgsql-jdbc@postgresql.org > Objet : Re: [JDBC] Problem loading driver > > > Hi Maignan, > > How do you run your program? > > Have you tried with the -cp commandline parameter? > > MAIGNAN Luc wrote: > > =20 >> I try to load the jdbc driver by the following code :=20 >> >> Class.forName("org.postgresql.Driver"); >> >> >> but I raise a ClassNotFoundException. >> >> But my CLASSPATH contains the postgresql-8.1-405.jdbc3.jar >> >> >> Any ideas ? >> >> Best regards >> >> >> ********************************************************************* >> Ce message et toutes les pi=E8ces jointes (ci-apr=E8s le "message") so= nt =E9tablis =E0 l'intention exclusive de ses destinataires et sont confi= dentiels. Si vous recevez ce message par erreur, merci de le d=E9truire e= t d'en avertir imm=E9diatement l'exp=E9diteur. Toute utilisation de ce me= ssage non conforme =E0 sa destination, modification, diffusion ou toute p= ublication, totale ou partielle, est interdite, sauf autorisation express= e.FININFO (et ses filiales) d=E9cline(nt) toute responsabilit=E9 au titre= de ce message, dans l'hypoth=E8se ou il aurait =E9t=E9 modifi=E9, alt=E9= r=E9, falsifi=E9 ou encore =E9dit=E9 ou diffus=E9 sans autorisation. >> ----------------------------------------------------- >> This message and any attachments (the "message") is intended >> solely for the addressees and is confidential. If you receive this=20 >> message in error, please delete it and immediately notify the=20 >> sender. Any use not in accord with its purpose, any dissemination=20 >> or disclosure, either whole or partial, is prohibited except formal=20 >> approval. Neither FININFO (nor any of its subsidiaries or affiliates) = >> shall be liable for the message if modified, altered, falsified, edite= d=20 >> or diffused without authorization. ***********************************= *********************************** >> >> ---------------------------(end of broadcast)-------------------------= -- >> TIP 1: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that yo= ur >> message can get through to the mailing list cleanly >> =20 >> =20 > > =20 --=20 Mads N. Vestergaard | Standard Sys Admin Answer #112:=20 http://rwxr-xr-x.dk | "Well, it works for me." --------------000308070003080605030407 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Hi Maignan,
man java, will tell you what the -cp does....
"       -classpath classpath
       -cp classpath
              Specifies a list of directories, JAR archives, and ZIP  archives
              to  search for class files.  Class path entries are separated by
              colons (:). Specifying -classpath or -cp overrides  any  setting
              of the CLASSPATH environment variable.
              If -classpath and -cp are not used and CLASSPATH is not set, the
              user class path consists of the current directory (.)."
Also please keep all mails on-list.
Try it, as Dave mentioned it probably is a problem with your CLASSPATH.
Try to give us the ouput of `echo $CLASSPATH`.

MAIGNAN Luc wrote:
No I just do : 

java MyClass

What does the -cp do ?

-----Message d'origine-----
De : Mads N. Vestergaard [mailto:mnv@timmy.dk]
Envoyé : mercredi 10 mai 2006 14:04
À : MAIGNAN Luc
Cc : pgsql-jdbc@postgresql.org
Objet : Re: [JDBC] Problem loading driver


Hi Maignan,

How do you run your program?

Have you tried with the -cp commandline parameter?

MAIGNAN Luc wrote:

  
I try to load the jdbc driver by the following code : 

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


but I raise a ClassNotFoundException.

But my CLASSPATH contains the postgresql-8.1-405.jdbc3.jar


Any ideas ?

Best regards


*********************************************************************
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le détruire et d'en avertir immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, modification, diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse.FININFO (et ses filiales) décline(nt) toute responsabilité au titre de ce message, dans l'hypothèse ou il aurait été modifié, altéré, falsifié ou encore édité ou diffusé sans autorisation.
-----------------------------------------------------
This message and any attachments (the "message") is intended
solely for the addressees and is confidential. If you receive this 
message in error, please delete it and immediately notify the 
sender. Any use not in accord with its purpose, any dissemination 
or disclosure, either whole or partial, is prohibited except formal 
approval. Neither FININFO (nor any of its subsidiaries or affiliates) 
shall be liable for the message if modified, altered, falsified, edited 
or diffused without authorization. **********************************************************************

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly
  
    

  

-- 
Mads N. Vestergaard   |  Standard Sys Admin Answer #112: 
http://rwxr-xr-x.dk   |   "Well, it works for me."

--------------000308070003080605030407--