Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you run an applet from the command line?

 
Jessica Hope
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all! I'm very new here and to Java, but I've had good success so far. This seems like a good place.

Anyhow, my question is whether there is a way to run an applet from the command line or whether you have to embed the applet onto an HTML web page to run it. Obviously, the usual "java Foo" doesn't work for an applet, because it tries to call main and there may not be main in an applet (if I understand correctly).

I know that there is such a thing as "appletviewer," but I don't think I understand what that is or how it works.

To extend things a bit, I'd also appreciate a basic overview of which Java web technologies do what. I know that there are applets, servlets, JSP, Java Web Start, etc. Once one knows the lay of the land I'm sure the distinctions are obvious and clear, but when one is just starting out it's hard to know what each of these different technologies are, what they do, and in what situations one would use each.

Thanks in advance!
[ December 05, 2008: Message edited by: Jessica Hope ]
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Try to go through the examples found under below link...and get familiar with applets

http://www.roseindia.net/java/example/java/applet/
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
appletviewer takes as its command-line parameter the name of an HTML file that contains an APPLET tag. In fact, the HTML file needn't contain more than just the APPLET tag, so it's easy to set up. You can find the details of the APPLET tag in the Sun Java Tutorial or in the pages mentioned by Eshwar.

Let's not talk about web technologies in this thread, as this forum is about applets; please post a new thread in the servlets forum.
 
Jessica Hope
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay... many thanks, Eshwar and Ulf. There's lots of good information in that link, Eshwar, and I appreciate your explanation of "appletviewer," Ulf.

Cheers!
[ December 06, 2008: Message edited by: Jessica Hope ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic