• 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

Running an applet in appletviewer

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
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"

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to have a html file to view the applet using the appletviewer
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
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:
appletviewer Text.java

Hope that helps,
Daniel


[This message has been edited by dani3l (edited November 04, 2001).]
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good comment, Daniel!
I hope you will read http://www.javaranch.com/name.jsp and re-register with a valid name and that you continue to post here.
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic