Karl
Karl

Reputation: 781

Calling an applet from html

I am working on a project and need to call an applet from HTML, im doing this:

<applet code="AppletClient.class" width="350" height="200" </applet>

It's giving me an error that the AppletClient.class cannot be found. If I copy that file and paste it in the same location of the HTML file it works. How can I fix this?

Upvotes: 2

Views: 3763

Answers (1)

PeakGen
PeakGen

Reputation: 23025

" however if i copy that file and paste it in the same location of the html file it works no problem "

You have already noticed the issue. Correct the path, it will work. Right now you are navigating to the classess folder. However, try removing the first "/".

<applet code="AppletClient.class" codebase="/classes"

            width="350" height="200">

put location inside the codebase tag. Code tag is for the class name. I missed it first time , sorry :(

Upvotes: 3

Related Questions