I have JDK1.3 installed in my PC. I have written an Applet in Java called Applicant.java.I could compile the program successfully, however 1. when I type "appletviewer Applicant" at the dos prompt i get the message : I/O Exception while reading c:\jdk1.3\work\Applicant (The sustem cannot find the specified file) make sure that Applicant is a file and is readable. 2.when I tyoe "appletviewrer Applicant.class" I get the message: warning :no Applets were started .Make sure the input contains an Applet <tag> and tells me about the usage etc. 3.When I created an HTML file as follows <html> <Applet <br /> code= "Applicant.class"<br /> height=500<br /> width= 300<br /> codebase= "c:\jdk1.2.2\work"<br /> align=center<br /> alt="not supported" <br /> > </Applet> </html>
and run it using Internet Explorer it shows a gray patch on the screen of the dimensions of an applet and nothing else.
when I run it on the Netscape navigator it seems to come up and nothing con\mes up and the staus bar says "Applet Applicant error:java.lang.ClassFormatError: Class already loaded" and sometimes some such similar error.
I have changed the directory of both .java and .class files in all possible ways an I feel that it may not because it is in the wrong directory. However I have confusion regarding the directory structure of Java Kit as dofferent kits have different structures.
Sathya, Looks like you have not included the html tags for applet in your .java file. You have to include the tags between 2 pair of front slashes. Other way could be to create a .html file with the same name as the .java file. Enter 'appletviewer yourclassname.html'. This should work.
I think you sould give command like this >appletviewer Applicant.html You can make a html file of exisiting Applicant.class file like this : <html> <applet code="Applicant.class" height=300 width=400> </applet> </html> I hope this will work.. Dhaval
Whatever you say buddy! And I believe this tiny ad too: