Thread: Applet problem
Hi I have some problem with my applet in fact when i use jdbc for postgresql with a basic java program it perfectly works. when i try to connect from the server to the server it works. When i try from an other computer to the server it works. but when i try to use it from my applet, it says it cant load the drivers.I tried from the server and from another computer , it both does'nt work. for the sources, i use exemples from postgresql.org if you have any solution, it will be great thanks Cédric.Picard
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, > in fact when i use jdbc for postgresql with a basic java program it > perfectly works. > when i try to connect from the server to the server it works. When i try > from an other computer to the server it works. > but when i try to use it from my applet, it says it cant load the drivers.I > tried from the server and from another computer , it both does'nt work. The classpath of an applet is very restricted and specifically different from standalone applications. You have to bring the postgresql code into the classpath. The canonical way would be to create one jar-file containing your applet and all needed classes from postgresql.jar, but there are probly better ways I don't know of :-) Mit freundlichem Gruß / With kind regards Holger Klawitter - -- lists <at> klawitter <dot> de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFA4sfM1Xdt0HKSwgYRAlpsAJ9VESrW7gAYZOFqC/7YNxoFYG24OwCfaa1g +pns4GKpgSrbx9N2HPUvQ9o= =isx6 -----END PGP SIGNATURE-----
thanks but i didn't mentionned that i'd put archive="postgresql.jar" in the call of the applet...(in html file)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, > but i didn't mentionned that i'd put archive="postgresql.jar" in the call > of the applet...(in html file) Well, it *should* work then. Are you sure that its not the class name of the applet itself which is not being found? (In Mozilla you can look at Tools->Web Development->Java console). Apart from that, we need the full applet-element declaration from the webpage, name of your browser, jdk version of your browser plugin, and the exact error message (with stack trace). Mit freundlichem Gruß / With kind regards Holger Klawitter - -- lists <at> klawitter <dot> de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFA4urH1Xdt0HKSwgYRArEhAKCA3k641pkp7XG1aISBxp3kCPHsugCcCs+k +JJnY8fKYC+mZnG/MSACNDo= =3x6O -----END PGP SIGNATURE-----
if your problem is that your browser cannot find "org.postgresql.Driver" you can try this: unpack the postgresql.jar file in the directory in where you have your applet, for my this works
I hope this is helpfull to yuo
cedric.picard@esial.uhp-nancy.fr wrote:
cedric.picard@esial.uhp-nancy.fr wrote:
Hi
I have some problem with my applet
in fact when i use jdbc for postgresql with a basic java program it perfectly
works.
when i try to connect from the server to the server it works. When i try from an
other computer to the server it works.
but when i try to use it from my applet, it says it cant load the drivers.I
tried from the server and from another computer , it both does'nt work.
for the sources, i use exemples from postgresql.org
if you have any solution, it will be great
thanks
Cédric.Picard
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Do You Yahoo!?
Yahoo! Net: La mejor conexión a internet y 25MB extra a tu correo por $100 al mes.