wood burning stoves*
The moose likes JDBC and the fly likes Applet doesn't establish JDBC connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Applet doesn Watch "Applet doesn New topic
Author

Applet doesn't establish JDBC connection

Ben Weaver
Ranch Hand

Joined: May 10, 2000
Posts: 40
I am trying to set up an applet with JDBC functionality and can't get the thing to work. I've written the GUI so it can be loaded either as a JFrame or as a JApplet. As a JFrame application it works fine, establishing the JDBC connections and firing the appropriate Oracle queries. As an applet, it comes up fine on the screen, but does not connect to the database. All the files (the applet, a "DbLayer" class, and an inner event-handling class) are stored in a Resin web server on my machine. I've put all the applet files into a common jar file, and have put the path for this .jar file into my windows NT CLASSPATH.
What should I do to enable the connection between the applet
and our local database?
Many thanks in advance!
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I ran into a simular problem with the WebLogic server.
Try adding the JAR file name to you CLASSPATH.
CLASSPATH=.:C:\JDK1.2.2\LIB:C:\JAVA\myjava.jar
Hope this helps, Monty6
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Applet doesn't establish JDBC connection