Borland provides a free-of-charge command line compiler for the C language. (Note
Microsoft has matched this astounding offer with the release of their command line
compiler and linker ... don't you love competition)
To use the Borland compiler to build the AduJava demo follow these steps.
Download and install the Borland Windows 5.5 compiler.
Adjust the setpathB.bat file to reflect the location where the Borland compiler is
installed on your computer.
On my computer the setpathB.bat file looks like this:
Adjust the compileB.bat file to reflect the locations where the Borland compiler and
the java SDK are installed on your computer.
On my computer the compileB.bat file looks like this:
Be aware that the editor has wrapped the second line around. What appears to be the third
line is really the tail end of the second line. The file has only three lines in it.
In case your display is not clear here is a copy of the Borland
compile command file
Note: rename the file to compileB.bat if you want to run it.
Here is the compileB.bat file as in-line text. (it will probably run off the right of
your screen).
Coff2Omf AduHid.lib AduHidOMF.lib
BCC32 -c -w-8057 -w-8004 -IC:\Borland\BCC55\Include -LC:\Borland\BCC55\Lib -IC:\j2sdk1.4.2_07\include -IC:\j2sdk1.4.2_07\include\win32 AduJava.c
BCC32 -tWD -LC:\Borland\BCC55\Lib AduHidOMF.lib AduJava.obj
To build the demo:
- Open a DOS command window
- Change to the directory containing AduJava.java
- run "setpath.bat"
- run "javac AduJava.java"
- run "javah AduJava"
- run "setpathB.bat" (note the extra B in the command name)
- run "compileB.bat"
- test the program with the command "java AduJava"
The Borland compiler issues some warnings that the Microsoft compiler did not. We will
ignore the warnings for the purposes of this demo. The output looks like this. The lines
that you type are highlighted in yellow.
|