The interactive environment can be invoked
directly from a Jar file as
java -jar Environment.jarThe antlr, jas and jhelp files must be in the parent directory of the one containing the
Environment.jar.
This also requires Java 2.
jre/classes not being
a directory or archive when Omegahat starts up.
if(findClass("FormulaParsing",-1) != null)
addFunctionTable(FormulaParsing);
if(findClass("VarSequenceFunctions",-1) != null)
addFunctionTable(VarSequenceFunctions);
util.Vector), the interpreter can be
told to warn of such duplication. This is done by setting
the global variable ShowMultipleClasses of
BasicEvaluator
to true
(A good place to do this is in the user initialization file, .omegahatrc file in your home directory.)
A warning is generated if more than one class is located.
[1] this.ShowMultipleClasses = true
true
[2] Vector
Found 2 classes named Vector
0) class antlr.collections.impl.Vector
1) class java.util.Vector
class antlr.collections.impl.Vector
Of course, turning this feature on helps identify potential problems based on unqualified name assumptions, but also slows things down by forcing searches to be performed for all entries in the package lists rather than terminating when the class is found.
This is the same mechanism currently being used to implement interpreted classes.
$HOME/.omegahatrc
is now source()d
at the end of OmegaInit
script.
This can be turned off using the flag -u
of the omegahat script.
A different file can be specified via the argument
trailing a +u flag.
omegahat +u /tmp/alternativeScript