File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes Applet cant find file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet cant find file" Watch "Applet cant find file" New topic
Author

Applet cant find file

Dan Lynch
Ranch Hand

Joined: May 16, 2003
Posts: 47
Hey,

Im trying to get an applet to work with some libraries. I can get the applet to work in the IDEs appletviewer, but when I run the applet in a browser the java console reports the following error:

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

This file is in a library and the library is included in the classpath when I compile.

Any ideas to solve this problem please.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

The jar file has to be available to the applet at runtime, as well. Applets won't use the CLASSPATH. Either the jar (or its contents) needs to come down from the web site, or it needs to be installed as a "standard extension" on the desktop (i.e., in the JAVA_HOME/jre/lib/ext directory.)


[Jess in Action][AskingGoodQuestions]
Dan Lynch
Ranch Hand

Joined: May 16, 2003
Posts: 47
Hi,

I have since put all the jar files in the same directory as the .html file. The error says this:

java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver.

But the jar holding the above files is in the same dir as the html file. How do I get the applet to see that opening the .jar will reveal the above file.

I put the path of the .jar in the archive part of the applet tag.

archive="ojdbc14.jar"

Help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet cant find file
 
Similar Threads
Deploying applets in a web application
applet within browser not releasing file resource
Problems with loading wav-file
Applet can't write to the file, Permission denied
java lang UnsatisfinedLindError