Home | Previous Page | Next Page   Programming DataBlade Modules in Java >

Compiling Java DataBlade Module Code

BladeSmith generates the Project_Java.mak makefile in the src\java directory. Use this makefile to compile Java code from the command line on UNIX and Windows.

When you compile, the makefile produces a JAR file, Project.jar, in the source code directory src/java. This file is appropriate for the server and client implementations.

The makefile requires that you set the following environment variables before you compile:

Windows NT Only
UNIX Only
End of UNIX Only
End of Windows NT Only

The BINDIR variable in the makefile determines where the JAR files are written.

BladeSmith creates server, all, and clean targets in the makefile. The server target builds the JAR files. The clean target deletes the JAR files. The default all target is equivalent to the server target.

Important:
When you generate code in BladeSmith, set the Format property of the DataBlade node to the correct file format for your operating system (UNIX or DOS). The default is DOS. See Generating Source Files for more information.

Use the Project_Java.mak makefile with the JDK 1.1.x compiler.

To compile and link your DataBlade module JAR files
  1. If you are compiling on a different computer than the one on which DBDK is installed, copy the generated src/java directory with its contents to the target directory.
  2. Execute the appropriate command at the UNIX C shell or the MS-DOS prompt:
UNIX Only
make -f Project_Java.mak 
End of UNIX Only
Windows NT Only
nmake -fProject_Java.mak 
End of Windows NT Only

Project is the name of the DataBlade module project. The Project.jar files are created in the src/java directory.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]