Temporary Files for Content Viewer Applications

Note: The information on this page is for the Content Viewers feature, which is not available on all platforms. If the Edit->Content Viewers option is missing, (for example, if you are running &browser.name.prefix;TM &browser.name.suffix; on the JavaStationTM platform), the information on this page does not apply to your browser.

Temporary Files for Content Handlers

When &browser.name; displays an application within the browser, it uses a content handler to do so. A content handler may create temporary files. By default, these are created in the /tmp directory on SolarisTM systems, or the c:\temp directory for Windows systems. Windows users who do not have a c:\temp directory should edit the JavaTM runtime environment file:

hotjava-install-directory\runtime\lib\content-types.properties

Change the temp.file.template property near the top of the file to use an alternative directory for the temporary files.

Note: You should not edit the content-types.properties file other than to change the value of the temp.file.template property. Also, note that the "\" character is the escape character in this file. Therefore, to specify "\" in a directory name for Windows systems, you'll need to type "\\".

&browser.name; never deletes the temporary files created by content handlers.

Temporary Files for Unknown Content Viewer Applications

When &browser.name; doesn't know how to handle content of a particular type, it displays the "Unknown Viewer" page to ask you what to do with the content. If you specify that an application should be launched, a temporary file is created to pass the data to the application. In this case, temporary files are created in one of the following directories:
  1. If possible, they are put in a temp subdirectory of the .hotjava directory. The .hotjava directory is placed in your home directory if you have one. Windows users without home directories will find the .hotjava directory under the directory where &browser.name; is installed.

  2. If that fails, the temporary files are created in the directory specified by the HOTJAVA_HOME environment variable.

  3. If that fails, they are created in the directory in which &browser.name; was started.

By default, &browser.name; does not delete these temporary files. This is because some applications, especially on Solaris systems, spawn other applications that try to access them. If &browser.name; deletes the temporary file after the application it creates is finished, and that application has started another application, the child application may attempt to read the temporary file after it has been deleted.

If you know that the applications you launch do not create child applications, you can safely change &browser.name; to delete the temporary files it creates. To do so, add the following property to your properties file (described below):

  viewerunknown.delete.tmpfile=true 
On Windows systems, the properties file is in your home directory if the environment variable HOME, HOMEDRIVE, or HOMEPATH is set. Otherwise it is:
  hotjava-install-directory\.hotjava\properties
Add the viewerunkown.delete.tmpfile=true property to this file. Note that you need to quit &browser.name; before editing this file, or else your edits will be lost when you later quit the current browser session.

On Solaris systems, your properties file is:

  $HOME/.hotjava/properties
Add the viewerunkown.delete.tmpfile=true property to this file. Note that you need to quit &browser.name; before editing this file, or else your edits will be lost when you later quit the current browser session.


Table of Contents INDEX

Copyright © Sun Microsystems, Inc.