Java Plug-in API: File Format

The Java Plug-in API utilizes standard JAR files to contain the plug-in code and any plug-in resources. Plug-in files do not however have to have the .jar extension. Any or no extension can be used, though .plug is recommended. In addition the JAR file must contain a plug-in information file and the classes contained in the file must conform to the Java Plug-in API constraints.

JAR files normally contain a manifest file stored under the pathname META-INF/MANIFEST.MF. In addition, in order for the JAR file to be a valid Java Plug-in API file it must contain a plug-in information file. The plug-in information file must have the path META-INF/PLUG-IN.XML and conform to the plug-in information file specification.

In addition to containing a Java Plug-in API information file the class specified as the plug-in class in the information file must adhere to the following constraints:

  1. Have a default constructor which will be used to instantiate it.
  2. If the class has the following methods they will be invoked.


jwalker@cs.oberlin.edu