Обсуждение: Problem Applet-Appletviewer
Hi: I have a problem. I have Postgresql v.6.3 and jdk1.1.3. I wrote un applet of consul and one table of postgresql Driver (jdbc:postgresql). I load ClassforName(jdbc:postgresql). it works fine only if: prompt$ java file-consul and not works appletviewer file-consul.html (Not show data, and initial applet ok). Thank. --- jliendro@correo.secyt.gov.ar
On Mon, 23 Nov 1998, REDCYT - Juan Carlos Liendro wrote: > Hi: > I have a problem. > I have Postgresql v.6.3 and jdk1.1.3. > I wrote un applet of consul and one table of postgresql > Driver (jdbc:postgresql). > I load ClassforName(jdbc:postgresql). > it works fine only if: > prompt$ java file-consul > and not works > appletviewer file-consul.html > (Not show data, and initial applet ok). Do you have any Exceptions thrown when you run it as an applet? It would help to know what they are to debug this problem. -- Peter T Mount peter@retep.org.uk Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres Java PDF Generator: http://www.retep.org.uk/pdf
At 21:43 +0200 on 23/11/98, REDCYT - Juan Carlos Liendro wrote: > Hi: > I have a problem. > I have Postgresql v.6.3 and jdk1.1.3. > I wrote un applet of consul and one table of postgresql > Driver (jdbc:postgresql). > I load ClassforName(jdbc:postgresql). > it works fine only if: > prompt$ java file-consul > and not works > appletviewer file-consul.html > (Not show data, and initial applet ok). You have to use: Class.forName("postgresql.Driver"); The "jdbc:postgresql" is not the name of the driver class to load, but the URL of the database to which you connect. In all probability, it fails, but it works when you run "java", because the driver is actually in your classpath. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma