Wednesday, January 14, 2009

Running JAR-Packaged Software

In The Java Tutorial, the lesson on running jar package software opens by introducing three scenarios:

  • Your JAR file contains an applet that is to be run inside a browser.
  • Your JAR file contains an application that is to be invoked from the command line.
  • Your JAR file contains code that you want to use as an extension.
The second of these I have already covered, I have no idea what the third means, so I shall focus on the first. I shall create an experimental page on my web site to test the line by line. From the example given:
"open brace"
applet code="TicTacToe.class"
width="120" height="120"
"close brace"
I shall post:
"open brace:
applet code="AMJFormA002.class"
"close brace"

I have removed the height and width parameters because they don't apply to my app.

When I refresh my page I get a brief flash of the java logo, then a long error message.

Ages ago, I read that something needs to be installed on the server side, and when I checked with my ISP they replied that they didn't have it and weren't planning to any time soon. Perhaps bad people plant java applets in web pages to do bad things. Be that as it may I must find out what it was. I shall follow the link to the Applets lesson.

No comments: