• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Applet not starting

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

------------------
Sathyajith
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be possible for you to put your applet code out here so we can look at it.
Thanks
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic