javAPRS
Home Page

Installation


Like all Java programs, javAPRS comes as a set of .class files, packed in a jar file or a cab file. These files are the program code and data structures that make javAPRS run. The jar and cab files should be placed in a folder called "javAPRS". Note that for many WWW servers, capitalization is significant, and should be left as is.
japrspng.cab and japrspng.jar are only needed if you will be using PNG images for maps.
japrsshp.cab and japrsshp.jar are only needed if you will be using ShapeFile maps.
javAPRS2.jar requires Java 1.5 and above and does not require any other jars to run.

yourPage.html
javAPRS/
     yourData.tnc
     javAPRS2.jar
     japrs.jar
     japrs.cab
     japrspng.jar
     japrspng.cab
     japrsshp.jar
     japrsshp.cab
     maps/
         usa.html
         yourmap.mp
         maplist.txt

You do not need to have Java installed on the web server, the class files are just more data to be sent to a client by the server. However, you may want to get the Sun Java Development Kit (JDK) SE for your machine (it's free). With the JDK installed, you won't need to run the applets in a browser, which will speed up your development.

You can also use wjview (Windows), appletviewer (Sun JDK), or other applet viewers to run javAPRS outside of a browser. For these applications, unpack the japrs.jar into its own directory and add the directory to the classpath for proper operation.

Within the HTML file, a special tag is used to invoke applets like javAPRS. The allaprs.htm map on this web site uses:

<APPLET code="javAPRS.class" codebase="javAPRS" height="400" width="600" ID="javAPRS" archive="japrs.jar">
<PARAM name="cabbase" value="japrs.cab">
<PARAM name="drawVectors" value="true">
<PARAM name="mapList" value="txstate^Texas$usacen^Central USA$JUSA^USA $JWORLD^World $usaeast^NE USA$usaseast^SE USA$usawest^West USA$iailinmo^MidWest$JEUROPE^Europe ">
<PARAM name="showMapLabels" value="true">
<PARAM name="dataFile1" value="netc:1234:dummy.server.net">
<PARAM name="showstationnames" value="false">
<PARAM name="showNewStations" value="false">
<PARAM name="dosMap" value="txstate.mp">
<PARAM name="pickBackground" value="true">
<br />
Sorry, your browser doesn't do Java.
<br />
</APPLET>

The CODEBASE parameter specifies where the jar and cab files are located. This is accomplished with the CODEBASE parameter.

CODE tells the browser which class file to start executing. As other class files are called by the program, they will be automatically loaded.

The ARCHIVE tag specifies the jar file(s) containing the applet program. The jar file is signed so your browser will allow it (with the user's approval) to access a data feed from another site. Microsoft uses a cab file for this function in their no longer supported Java VM. Hence, the cabbase parameter must be included, as well. If multiple jar and cab files are used, separate them with a comma (no spaces) and replace "cabbase" with "cabinets".  It is recommended to use archive="javAPRS2.jar" to support all future JVMs.

WIDTH and HEIGHT specify the amount of space which should be reserved for the applet. javAPRS automatically uses as much space as is allocated, however it is possible to make the space too large for the graphic buffers to be created, causing the program not to run. Unfortunately, there isn't any way to predict this, but sizes up to 500 by 300 seem to work fine. javAPRS now includes a status line which takes 22 pixels in height.

Any other information which must be passed to the applet is done with the PARAM tag, specifying the name and value of each parameter. The cabbase parameter must be specified as shown to support Microsoft browsers. Each parameter has a default value, and need not be entered if the default value is desired. All the parameters which javAPRS understands are detailed on the Parameters page.

Any text or other HTML commands which appears between the <APPLET> and </APPLET> tags will only be displayed if the page is being viewed on a browser which doesn't understand Java. Instead of the highly informative error message shown here, you could display a GIF file of what the applet would look like.