Extension:Java Applet

MediaWiki extensions manual
OOjs UI icon advanced.svg
Java Applet
Release status: beta
Implementation Tag
Description Add java applets to a wiki
Latest version 2.0 (2013-06-02)
MediaWiki Tested on 1.22beta
Database changes No
License CCPL
Translate the Java Applet extension if it is available at translatewiki.net
Check usage and version matrix.

The Java Applet extension allows users with the 'javaapplet' right to upload Java applets (class and jar files), which can then be inserted into pages by anyone using the <java_applet> tag.



  • code, java class file (required)
  • width, applet width (required)
  • height, applet height (required)
  • archive, jar file name (required)


<java_applet code="File:PegGame.class"  height="150" width="150" archive="File:PegGame.jar" />


First, ensure that MediaWiki enables Java uploads by setting

$wgFileExtensions = array_merge( $wgFileExtensions, array( 'class', 'jar' ) );
$wgAllowJavaUploads = true;

To install, download and extract the .zip snapshot in your extensions directory or clone https://github.com/TK-999/mw-ext-JavaApplet into your extensions directory. To import the extension, add

require_once( "$IP/extensions/JavaApplet/JavaApplet.php" );

to your LocalSettings.php file.

The extension only allows users with the 'javaapplet' right—by default, sysops—to upload .class and .jar files. You can adjust this by adding this right to other groups after require_once( "$IP/extensions/JavaApplet/JavaApplet.php" ); in LocalSettings.php:

require_once( "$IP/extensions/JavaApplet/JavaApplet.php" );
$wgGroupPermissions['ninjas']['javaapplet'] = true;

To DoEdit

Automatically detect the 'code' value from jar files with properly setup manifests.