In the standard Field installation you'll see, parallel to the main Field application an extensions directory. Field looks to this directory to contain things that extend it. If you want to extend Field in Java or integrate Field into your own code-base, this is one of your routes in. See the plugin manager for a visual way of turning on and off these extensions.
Field's classloader understands two kinds of things in this directory: .jar files, and .mf files:
Field-PluginClass: classname
entry, then class classname
is declared as a plugin for Field.Field-PluginClass: classname
entry they can also have a Field-RedirectionPath: path
. In this case, path
gets put onto the classpath for Field. This is ideal if you want to point Field to the top of your current, live, code base. Paths can be absolute or relative (to the extensions directory).Field-Property-
x — sets a property x; and Field-Property-Append-
x — appends a property (making it semicolon separated). This is useful, for example, for extending the property java.source.paths
to include additional places for Field to look for java sources. Note also, that since '.'s are forbidden in manifest file keys, you should use '-'s instead. So that's:Field-Property-Append-java-source-paths: /users/someone/somebodiescodebase/src/
Field-RedirectionPath: /users/someone/somebodiescodebase/classes/
import banana
and have it do what you'd expect. If the first line of the file contains #field-library
then the whole text of the file is automatically executed upon loading a sheet. Both ways are pure convenience — you can add a new file to this directory from within the text editor (just right click to get these options). It's a good way to take a piece of Python that you've developed in one sheet and have it available throughout your workspace.