Summary: Use Java Applets in PmWiki pages
The applet.phpΔ script provides an
(:applet:) markup to handle this.
Proceed to installation steps as usual for cookbook recipe scripts.
- download file and place in cookbook directory
- and add
include_once("$FarmD/cookbook/applet.php"); in local/config.php
Java Applet Installation
- Put the java applet files (usually .class hierarchies or .jar) into
pub/applets subdirectory (that you may need to create).
- If required, extra subdirectories may be used to separate several applets.
Once installed, the following markup is available:
(:applet PARAMETERS... :)
with the following parameters:
- The applet entry point class (required).
- The applet geometry (required).
- The applet jar archive name (optional, to be used if the applet is provided as an archive).
- The extra subdirectory specification needed to reach the applet (optional, the trailing slash is required).
All other supplied parameters are forwarded to the selected applet:
- is translated as
<param name='MY.PARAM' value='MY_VALUE' /> tags.
As a live example, you may have a try with the Free JDK Demo Clock applet provided by Sun here:
- Download the demo archive and extract it into your
- Use the markup below (on a single line) to display the clock:
Life example: CalculatorApplet (adjusted by PKHG)
- Update for PHP 5.5 compatibility
- Solved (at last) the
- Added RecipeInfo data.
- Initial release.
See discussion at Applet-Talk
User notes +1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.