0

I have a java web server. One html page serves a java applet! I tested the html file without using the server, it works fine. the html file is placed with a folder named "applets" containing the ".class"

example

.html

<applet code="applets/init.class" width="80%" height="80%> </applet>

My problem is when i pass it through the java server, i get error

ClasNotFoundException
applets.init.class

I have successfully downloaded the .class directly through the browser, which means the server is serving the .class.

Why does the server search for the .class at "applets.init.class" when the actual path is "applets/init.class"

2

1 Answer 1

0

You have to do it like this:

<applet code="init" codebase="applets/" width="80%" height="80%"> </applet>

Also note the missing " to close the height.

Sign up to request clarification or add additional context in comments.

1 Comment

It does not work: ClassNotFoundException init

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.