File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applet in html page problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet in html page problem" Watch "Applet in html page problem" New topic

Applet in html page problem

Mark Lockery

Joined: Jun 04, 2004
Posts: 19
I'm having trouble getting an applet to run in a html window. The html code used is exactly the same as one for a working applet, i don't really understand.

Is there a size limit of objects/files related to the applet or something like that that could cause the problem? (the folder has a little over 8mb)

The result i get is just the gray java window thing in the middle of the webpage, as if it's loading, but it never (ever) loads.

html code is just:

oh and the Shoot.class file is in the same folder as the html of course.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
If you wrote the applet using java 1.2 or higher, you may need to change your html to require the applet plug-in.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Shashank Agarwal
Ranch Hand

Joined: May 20, 2004
Posts: 105
In java's web site i.e., u'll find an application called HTMLConverter. Download it. Now convert your html file into another html file using this HTMLConverter. It converts applet into objects (changes only the code of the Html file, not the java class file) and adds a plugin checker, so that whenever u run the html file, it checks for plugin. If its not there, it'll get from the java's site and bingo, ur applet will RUN.

Alternately, you may compile the applet specifically under JRE 1.1 conditions like this -

javac -target 1.1

All the best.
I agree. Here's the link:
subject: Applet in html page problem
It's not a secret anymore!