public class ForthLoader
extends java.lang.Object
Constructor and Description |
---|
ForthLoader(VM vm)
Initialise the loader to load files from the default
Java classpath into the given Virtual Machine.
|
ForthLoader(VM vm,
java.lang.String pathList)
Initialise the loader to load files from the given path
into the given Virtual Machine.
|
Modifier and Type | Method and Description |
---|---|
void |
load(java.lang.String packageName)
Search for a given Forth package (packageName) in
the configured search paths, interpreting the file using the
configured Virtual Machine.
|
public ForthLoader(VM vm)
vm
- the Virtual Machine to use when loading /
interpreting the file.public ForthLoader(VM vm, java.lang.String pathList)
vm
- the Virtual Machine to use when loading /
interpreting the file.pathList
- a list of paths to be used when searching for
the file.public void load(java.lang.String packageName) throws java.io.FileNotFoundException, java.io.IOException, ForthException
.jar
and .zip
file on the search path as well as directories for the file.
If the file is not found, it will search using a number of
default extensions.packageName
- the name of the Forth package to load.java.io.FileNotFoundException
- should the file not be found in the path.java.io.IOException
- should there be a difficulty loading the
file.ForthException
- should there be a difficulty with the
source code in the forth package.