If you wish to compile the library or testing the library, continue with
2 more steps.
4. Update your CLASSPATH with JUnit.
5. Run the test case with Junit.
Detailed installation instructions just below.
SJT.Mgmt is very easy to add into your existing application.
1. Construct an instance of a work manager object.
2. Implement a Runnable interface, containing executable code in the run()
method.
3. Pass the Runnable object to the work manager.
Detailed usage instructions further below
.
Or CVS on the commandline.
cvs -d:pserver:anonymous@cvs.simplethread.sourceforge.net:/cvsroot/simplethread
login
cvs -z3 -d:pserver:anonymous@cvs.simplethread.sourceforge.net:/cvsroot/simplethread
co .
Example:
CLASSPATH=.:{LIBRARY_DIRECTORY}/SJT.Mgmt.jar
You are done! If you want to recompile or test the library read on.
Example:
CLASSPATH=.:{LIBRARY_DIRECTORY}/SJT.Mgmt.jar:{LIBRARY_DIRECTORY}/junit.jar
Test case(s) are included in the {LIBRARY_DIRECTORY}/src directory
in order to ensure a smooth run in your environment.
In order to use the Junit java GUI application just execute the class, junit.ui.TestRunner.
Example:
unix $java junit.ui.TestRunner sjt.mgmt.ThreadTest
windows c:\java junit.ui.TestRunner sjt.mgmt.ThreadTest
UNIX MAKEFILE
Unix has a makefile for standard compilation, testing and cleaning.
make build, will compile the library from the source.
make test, will execute jrun and the test case
make clean, will remove all .class files from your directory
1. Construct an instance of a work manager object.
new SimpleWorkManager()
2. Implement a Runnable interface, containing executable code in the run method().
class MyWork implements Runnable
{
public void run() {
//some sort of executable code
}
}
3. Pass the Runnable object to the work manager.
workManager.addWork(myWork)
See the src/README.java source file for a typical implementation of SJT.Mgmt.
Happy computing.