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 in a Browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet in a Browser" Watch "Applet in a Browser" New topic
Author

Applet in a Browser

Jeremy Hooie
Ranch Hand

Joined: Aug 22, 2001
Posts: 38
Hi,
I, like many others, have an applet, which works fine in AppletViewer, but things go awry when loading in a browser. I know these are stupid questions, but I'm a newbie so bare with me. I have all the necessary classes and the HTML file in the same directory and I have downloaded and installed the Plug-In. If I put the class name in the code value in the HTML file I get the following error:

If I then add the package (DnD) to the code value in the HTML file, it can�t find the class. Has anyone experienced this before and discovered how to fix it?
Jeremy
sheetal bhandari
Greenhorn

Joined: Aug 26, 2001
Posts: 4
Hi
If you have more than one class then put all the classes in a jar file and then read them.It will work fine then
Sheetal
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

When you use a package, you don't put all the classes in the same directory. The directory structure mirrors the package structure. What you needed in your classes directory was a DnD subdirectory containing the ExsequorWeb.class file. And the directory name has to be properly capitalized even under Windows!


Customer surveys are for companies who didn't pay proper attention to begin with.
Jeremy Hooie
Ranch Hand

Joined: Aug 22, 2001
Posts: 38
Thanks, Tim. But now I've got another problem. I'm getting a RuntimePermissionException even though I've explicitly added this right in my .java.policy file using the Policy Tool.

Any ideas?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

You have to create a signed JAR. http://java.sun.com/docs/books/tutorial/security1.2/index.html
 
wood burning stoves
 
subject: Applet in a Browser
 
Similar Threads
Applet not inited problems
Applet not working
Applet in JSP
Problems with applet running in IE brwser
Loading java applet from a cab file failed