addClassPath
Add a path (a directory or a jar file containing packaged java class files) to the current classpath.
addClassPath(path)
Inputs
path The name of a directory or a jar file containing java class files.


Description

The specified path is added to the current class path for resolving references to Java classes. This function obviates the need for modifying the class path in the batch file that starts up Mathnium.

Example
>>// TestC is not in the class path.
>>a=new TestC();
Error TestC is not defined

 in \Main
>>// The file TestC.java
>>system more c:\tmp\TestC.java
Executing cmd.exe /C more  c:\tmp\TestC.java
SYSTEM>public class TestC
SYSTEM>{
SYSTEM>        public int test(int x){return x+2;}
SYSTEM>}
>>// The jar file containing the compiled class
>>system jar tvf c:\tmp\test.jar
Executing cmd.exe /C jar  tvf  c:\tmp\test.jar
SYSTEM>     0 Mon May 05 22:56:54 PDT 2008 META-INF/
SYSTEM>    68 Mon May 05 22:56:54 PDT 2008 META-INF/MANIFEST.MF
SYSTEM>   240 Mon May 05 22:56:40 PDT 2008 TestC.class
>>// add the jar file to the class path
>>addClassPath("c:\\tmp\\test.jar")
>>// now TestC can be instantiated and used.
>>a=new TestC()
>>a.test(10)
        12