Thursday, June 21, 2007

Using my code with Java packages

1. After having created Java packages, copy over the entire directory structure to desired machine (e.g., source files are in /home/afgane/dBLAST/src/com/dBLAST/util).
2. In order to compile the code, in base dir (e.g., /home/afgane/dBLAST), execute
javac -d bin/ src/com/dBLAST/util/*.java
The -d option specifies where to store class files. It will create all the package subdirectories from the specified folder (e.g., by specifying bin/, it will create bin/com/dBLAST/util/ and put all class files there).
3. In order to execute the code, first you must export directory where class files are. This can be done either by editing .bashrc file and adding a line such as the following one to it
export CLASSPATH=/home/afgane/dBLAST/bin/:$CLASSPATH
Alternatively, you can do it manually and executing that same line for each login session.
4. Finally, run the code by executing java com.dBLAST.util.DynamicBLAST_6 props.properties, for example from any directory.

No comments: