Difference between revisions of "ClearingP4Preferences"

From Protege Wiki
Jump to: navigation, search
Line 1: Line 1:
Protege 4 uses java preferences to store user preferences and activity.  This can be very nice because when a new version of Protege 4 is installed, it will remember such things as recent ontologies visited, the location of owl viz, rendering preferences and other such stuff.  But sometimes, when Protege is misbehaving, this becomes saved state about Protege that persists when everything else is clearedFor some operating systems, one can find the location of the java preferences and adjust them there.  For example, on linux machines the java preferences can be found in ~/.java/.userPrefs and on OS X machines the preferences can be found in ~/Library/Preferences/com.apple.java.util.prefs.plist.  On windows machines I believe that the java preferences are found in the registry but I could be wrong.
+
<br /><span style="font-weight:bold; font-size:20px;">Clearing Protege 4 Preferences</span><br /><br />
 +
 
 +
Protege 4 uses the [http://java.sun.com/j2se/1.4.2/docs/guide/lang/preferences.html Java Preferences API] to store user preferences and activity.  This allows for persistence of preference data across installations of Protege, e.g., recently opened ontologies, rendering preferences, location of Graphviz (used by the OWLViz plug-in), etcThe storage location of these preferences varies according to operating system:
 +
 
 +
* Linux - stored in a file at ~/.java/.userPrefs
 +
* Mac OS X - stored in a file at ~/Library/Preferences/com.apple.java.util.prefs.plist
 +
* Windows - stored in the Windows Registry at HKEY_CURRENT_USER/Software/JavaSoft/Prefs
 +
 
 +
Occasionally, users may need to clear the Java Preferences to fix errors displayed by ProtegePreferences can either be deleted manually, or via a tool called the [http://sourceforge.net/projects/jpui/ Java Preferences User Interface].
 +
 
 +
 
 +
<strong>Delete preferences manually</strong><br />
 +
To manually delete Protege 4.x preferences, first determine the location that preferences are stored on your operating system.  Locations are listed above in the introductory paragraph.  For Linux and Mac OS X, delete the Protege preferences file.  For Windows systems, delete the Protege preferences entry from the Windows Registry.
 +
 
 +
 
 +
<strong>Delete preference using the Java Preferences User Interface</strong><br />
  
 
However, there is a much nicer portable way of interacting with the java preferences directly.  There is a simple but very useful utility calls [http://sourceforge.net/projects/jpui/ Java Preferences User Interface].  It allows one to easily clear or update preferences and it is pretty clear where the Protege preferences live.  To use it type the following at the command line:
 
However, there is a much nicer portable way of interacting with the java preferences directly.  There is a simple but very useful utility calls [http://sourceforge.net/projects/jpui/ Java Preferences User Interface].  It allows one to easily clear or update preferences and it is pretty clear where the Protege preferences live.  To use it type the following at the command line:

Revision as of 14:17, January 15, 2010


Clearing Protege 4 Preferences

Protege 4 uses the Java Preferences API to store user preferences and activity. This allows for persistence of preference data across installations of Protege, e.g., recently opened ontologies, rendering preferences, location of Graphviz (used by the OWLViz plug-in), etc. The storage location of these preferences varies according to operating system:

  • Linux - stored in a file at ~/.java/.userPrefs
  • Mac OS X - stored in a file at ~/Library/Preferences/com.apple.java.util.prefs.plist
  • Windows - stored in the Windows Registry at HKEY_CURRENT_USER/Software/JavaSoft/Prefs

Occasionally, users may need to clear the Java Preferences to fix errors displayed by Protege. Preferences can either be deleted manually, or via a tool called the Java Preferences User Interface.


Delete preferences manually
To manually delete Protege 4.x preferences, first determine the location that preferences are stored on your operating system. Locations are listed above in the introductory paragraph. For Linux and Mac OS X, delete the Protege preferences file. For Windows systems, delete the Protege preferences entry from the Windows Registry.


Delete preference using the Java Preferences User Interface

However, there is a much nicer portable way of interacting with the java preferences directly. There is a simple but very useful utility calls Java Preferences User Interface. It allows one to easily clear or update preferences and it is pretty clear where the Protege preferences live. To use it type the following at the command line:

    java -jar jpui-0.4.0.jar

Here is a screenshot.

JavaPreferences-JPUI.png

This user interface will allow one to modify the Protege java preferences. In particular to delete the Protege Java preferences and return to a clean slate, select PROTEGE_PREFERENCES, click the Node menu and click delete.