Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Aplet not Starting help needed

 
Sathya Jith
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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
code= "Applicant.class"
height=500
width= 300
codebase= "c:\jdk1.2.2\work"
align=center
alt="not supported"
>
</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
 
praveen bi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
whats the name of ur HTML Coding
use this coding to run ur applet
ie appletviewer <html file name>
So this will work perfectly
bye
 
Sathya Jith
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Praveen
that solved my problem
------------------
Sathyajith
 
Noah Carroll
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To have java 2 applets run in a browser,you must download the jre for the browser. Then you must use object(for internet explorer) and embed(netscape) tags to make the applet invoke the downloaded jre. Applet tags don't work for java 2 applets in the available browsers.
------------------
I hope its helps, feel free to email me noahcarroll@juno.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic