Java Security and WebCALIS/Java UniEdit

Security in the world of Java is managed by creating or editing a plain-text file in your "home" directory called ".java.policy". (Note that this filename starts with a dot.)

If you do not currently have a ".java.policy" file, you can download this one, rename it to ".java.policy", and put it in your "home" directory (see below for what this means in MS Windows); or you can create one on your own. Essentially, the .java.policy file adds permission for WebCALIS by granting permission to the server from which it is launched. E.g., the following lines in the .java.policy file grant "all permissions" (and then some more permissions which aren't included in "all" permissions!) to WebCALIS when launched from "".

grant codeBase "" {
  permission "<>", "read, write";
  permission javax.sound.sampled.AudioPermission "record";
  permission java.util.PropertyPermission "user.dir", "read";
  permission javax.speech.SpeechPermission "javax.speech"; 
  permission java.lang.RuntimePermission "loadLibrary.jsapi"; 
  permission java.lang.RuntimePermission "modifyThread"; 
The downloadable file above grants such permission to at least the following three WebCALIS servers:


In order to access other websites than the one you launched the WebCALIS applet from; copy and paste text using your clipboard; save files to your local hard drive; print using your printer; record sound using your local multimedia capability; and other useful permissions, you must grant WebCALIS or Java UniEdit specific permission to do so, or simply grant them a blanket all-permissions (and even this does not appear to be all-encompassing). This is done in a plain-text file called ".java.policy" in your "home" directory. On Windows 9x/Me this is simply the main Windows folder, e.g., C:\windows. On Windows NT/2000/XP, this is your personal userid profile folder under the main Windows folder in NT4 or an upgrade from NT4, e.g., C:\winnt\profiles\youruserid"; and under C:\Documents and Settings\youruserid in Windows 2000 or XP, either upgraded from Win9x/Me or a fresh install.

If you downloaded the pre-built policy file above, place it in the above "home" directory. If such a file already exists, you can merge the two files and do further editing in a plain-text editor such as the Windows Notepad, or follow the procedure below (which is Sun's preferred procedure).

If you prefer, you can create or edit the ".java.policy" file" using the Sun utility called "policytool.exe". It is typically installed by the Java JRE/Plug-In at "C:\program files\java[soft]\j2re[version]\bin". If it is not there, you can use Windows "Find" from the Start button to look for it. Once found, you can use "Run" from the Start menu to start it.


Giving proper permissions is similar to the process for Windows. After installing the JDK, there will be a program called policytool. Create the .java.policy file, grant "All Permissions" (plus any others needed) to "", and any other desired servers, then save the file to your home directory.

Mac OS X

Set the appropriate permissions in accord with the following how-to, generously supplied by David Lane of Rice University.

Home | Site Map | Services | New | WinCALIS | UniEdit