This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Applets and the fly likes Running an applet in appletviewer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Running an applet in appletviewer" Watch "Running an applet in appletviewer" New topic

Running an applet in appletviewer

mansoor iqbal
Ranch Hand

Joined: Aug 14, 2000
Posts: 91
i am trying to run an applet application. but i get an error saying "I/O Exception while reading c:\java_practice\Text. Cant find specified file..". i am using jdk 1.3.1_01
the class compiles ok
when i try the command " appletviewer Text.class", i get back to the dos prompt
i get the error when i do: "appletviewer Text"

hai zhang

Joined: Oct 30, 2001
Posts: 11
You need to have a html file to view the applet using the appletviewer

Joined: Nov 04, 2001
Posts: 1
In order to run an applet with the appletviewer you'll need to pass an html file containing an HTML applet tag as argument.
So you need to create a simple html file containing an applet tag like this:
<applet code="Text" width="300" height="300"></applet>

A second possibiltiy would be to include a comment to your java file as follows:

Then you can invoke your applet by calling appletviewer with the name of the source file as argument:

Hope that helps,

[This message has been edited by dani3l (edited November 04, 2001).]
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9058
Good comment, Daniel!
I hope you will read and re-register with a valid name and that you continue to post here.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: Running an applet in appletviewer
It's not a secret anymore!