The JPython Registry
Because there is no good system independent equivalent of the Windows Registry
(or Unix envrionment variables) Java has it's own environment variable
namespace. JPython aquires it's namespace from the following three
sources (later sources override defaults found in earlier places).
-
The Java system properties: typically passed in on the command line
-
The file pointed to by the Java system property "install.root"/registry
-
If there is no "install.root" property, JPython tries to set it by looking
for jpython in the classpath
-
Whatever value for install.root is found, sys.prefix is set to this, and
sys.path has "install.root"/Lib appended
-
The file contained in "user.home"+".jpython"
Currently there are three important variables contained in this namespace:
-
python.path
-
Equivalent to the current PYTHONPATH environment variable
-
Future versions will allow this to be hierarchical as is done for java.packages
-
java.packages
-
Contains a list of all java packages installed on your system that JPython
wants easy access to
-
This can be used hierarchically, see the default "registry" file for an
example
-
python.proxy.savedir
-
This variable should typically be left undefined. It is used for
caching proxy class definitions.
See the section on Subclassing Java Classes for more information