Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet in html page problem

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you wrote the applet using java 1.2 or higher, you may need to change your html to require the applet plug-in.
 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In java's web site i.e. java.sun.com, 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 YourJavaFile.java -target 1.1

All the best.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic