I'm trying to make an applet, and when I test it in Eclipse it works and display a little bit of text I put in it. But when I try to put it in a browser it doesn't work. I know I have the correct plug-ins because I've used Java applets on the internet before.
This is the code I'm using in the html. It is directly out of a Java book I'm reading.
<html>
<body>
Applet Test.
<APPLET code="AppletTest" width=100 height=100>
Sorry, your browser isn't able to run Java applets.</APPLET>
</body>
</html>
I don't understand how it would find this applet test file. I made the file and after compiling it was called AppletTest.class, but I don't know where to put it so this HTML code will find it. I also have another book on Java that contradicts this code saying it should be:
<html>
<body>
Applet Test.
<APPLET code=AppletTest.class width=100 height=100>
Sorry, your browser isn't able to run Java applets.</APPLET>
</body>
</html>
Which is a little different, but is still really confusing.
Can anyone please set this straight for me?