Daylight Java Toolkit Wrapper ----------------------------- This is a Java Native Interface (JNI) to the Daylight Toolkits. This software is "contributed" source code, hence it is public domain, and may be freely distributed, modified, and used for any purpose. IT COMES WITH ABSOLUTELY NO WARRANTY OF ANY KIND. Contents -------- The gziped tar file contains the following files: libdj/*.[ch]: C and header files which wrap the Daylight Toolkits. com/daylight/*.java: Java source code for the JNI interface. demo/*java: Demo programs. How to compile and use DayJava ------------------------------ 1. Edit the Makefile. The values for JAVAC and JFLAGS for your platform should be uncommented. Make sure that the paths for JAVAC and JFLAGS are correct. 2. For MacOSX installs, uncomment and comment out the designated sections in the /libdj/makefile. 3. Verify that DY_ROOT is defined to point to a Daylight 4.91 distribution. This build depends upon the contrib makefiles, so it is necessary to build contrib under the Daylight distribution before attempting to build the java wrappers. If contrib is not built, go to $DY_ROOT/contrib/src and type 'make install'. More detailed instructions can be found in $DY_ROOT/contrib/_readme. 4. Type 'make install' in this directory. This will build the DayJava library named "libdj.so" and install it at $DY_ROOT/contrib/lib. The Java classes will be built under "com/daylight" and demo programs will be compiled. 5. For MacOSX installs, go to $DY_ROOT/contrib/lib and type 'ln -s libdj.so libdj.jnilib' . 6. Set the enviroment variable LD_LIBRARY_PATH to include $DY_ROOT/contrib/lib and the enviroment variable CLASSPATH to include both this directory and the demo directory. 7. For MacOSX install, add the environment variable DYLD_LIBRARY_PATH to include $DY_ROOT/contrib/lib. 8. Example Java source code and compiled classes are provided in the demo directory. The following is a example program which takes smiles from stdin and is a good test that DayJava is working properly. % echo "OCC" | java cansmi The output should be: CCO. If not, try debugging with "java -verbose cansmi" and "java -verbose:jni cansmi". Notes ----- Parameters for methods are the same as arguments for routines described in the toolkit documentation, except for the following differences: - status parameters are passed as an integer array of length 1 - string length parameters are not part of the interface - most strings are passed and returned using Unicode (for info on Unicode, see http://www.cl.cam.ac.uk/~mgk25/unicode.html) - for binary support, the following strings routines use a byte array: dt_stringvalue dt_setstringvalue dt_appendstringvalue dt_binary2ascii The following Java Development Kit (JDK) versions were used to compile this wrapper without errors or warnings: JDK 1.5.0 JDK 1.4.2 JDK 1.4.0 JDK 1.3.1 JDK 1.2.1 JDK 1.1.6 JDK 1.0.6 The following platforms have been tested: Red Hat Linux 7.x, 9, Enterprise 2.1, 3.0 SUN Solaris 7, 8, 9 The following platforms have not been tested: SGI Irix 6.x For questions, you may contact Daylight support for assistance. History ------- 10 Sep 1998 - This was the first version of the wrapper; contributed by Alberto Gobbi, Novartis Agro, Basel Switzerland. (Novartis_JDay.tar.gz) 14 Jun 2004 - Updated for 4.83 with new functions. Also cleaned up makefiles to build more easily. Changes by Jack Delany. (java_wrapper.tar.gz) 1 Jul 2004 - Complete rewrite with new class namespace "com.daylight" and more demo programs. Works with 4.83. Contributed by Mick Kappler. (DayJava-483.tar.gz) 17 May 2005 - Updated with support for 4.91; streamlined the makefiles. Changes by Jack Delany. (DayJava-491.tar.gz)