Compiling Jess source files
You can compile Jess by typing a few commands yourself.
cd "c:\Program Files\Jess61p8"
javac -d . jess*.java
javac -d . jessawt*.java
javac -d . jessfactory*.java
would work just fine, given that c:\Program Files\Jess61p8 is your current directory.
NOTE: Jess works fine with JDK 1.4, but you will get warnings during the compilation about a conflict between the new Java keyword "assert" amd the Jess function jess.Rete.assert(). These are just warnings, and they don't stop the compilation. This function is now deprecated in Jess and will be phased out over the next few versions.
If you have problems, be sure the CLASSPATH environment variable includes the current directory '.'. Don't try to compile from inside the Jess61p8/jess/ directory; it won't work. You must use a Java 2 compiler to compile Jess. The resulting code will run on any Java 2 or later VM. Jess works great with JDK 1.3. There are a number of optional example source files in the subdirectories Jess61p8/jess/examples/ that aren't compiled if you follow the instructions above. You can compile the examples one at a time. For example, to compile the example named pumps using the JDK on a Windows system, you can use the command
javac -d . jessexamplespumps*.java
Again, don't set your current directory to, for example, Jess61p8/jess/examples/pumps/ to compile the pumps example: it will not work. The compiler will report all sorts of errors about classes not being found and the jess package not being found. Compile everything from the Jess61p8 directory. I can't stress this enough: this is by far the most common problem people have in getting started with Jess!
Create jess.jar
Jess API will need the Jess.jar file. The following command will create a jar file.
cd "c:\Program Files\Jess61p8"
jar cvf jess.jar jess\*.class jess\awt\*.class jess\factory\*.class
留言列表