The src
directory
The source directory for the bundle contains all the code, both examples and the
"javageeks.com" packages, from the book.
The directory itself contains a variety of directories:
-
ClassLoaders:
The directory containing the sample code from the ClassLoaders
and Custom ClassLoaders chapters.
-
Configuration: All of the code that would be in the Configuration directory (which
does not exist) is in fact part of the javageeks.com library, so no directory exists for this
chapter.
-
Control: The directory containing the sample code from the Control and
RemoteControl chapters.
-
EmployeeSystem:
This directory contains the example business object model built
in the Business Objects and Business Object Models chapters. Note that the JDBC
example model uses the InstantDB database, which is also located as a peer to the "Src" directory.
-
Extensions:
The code and samples from the Extensions chapter.
-
JNI:
The native and Java code for the JNI chapter. Note that you will need
a Win32 C++ compiler to compile these samples--I used Microsoft Visual C++ 5.x. Borland's
C++Builder or Borland C++ compilers could also be used. I had little success using the Win32
port of gcc, owing to the fact that I couldn't figure out how to export functions from gcc
such that I could control the exported symbol name. If anyone who knows more about building
DLLs under Win32 using g++ knows how, please email
me--I'd appreciate it.
-
Lib:
The javageeks.com library, created from the more reusable elements of this book.
-
Middleware:
This directory contains the code and examples from the JNI chapter.
-
Monitoring:
The code and samples from the Monitoring chapter.
-
Persistence:
This directory contains the code and examples from the Persistence chapter. Note that
the JDBC samples will require access to a relational database; you can use the
InstantDB database, if no other one is available to you, or you simply
don't wish to pollute your production database with book code. :-)
-
Servlets:
The code for the Servlets chapter. Note that because much of the discussion in that
chapter is abstract, not many examples make it into actual code. In fact, only two (the
PassThroughServlet class and the RemoteStorageServlet class) are represented as code here.
-
Sockets:
The code and samples for the Sockets chapter.
-
Threads:
The directory containing the sample code from the Threads and
Threading Issues chapters. This includes the latest verison of Doug Lea's
concurrent.jar library.
All of the code was built using the 1.2.x version of Sun's Java Development Kit; some effort
was made to provide for platform portability, but given that this is server-based coding, where
the platform is well-known, not a lot of effort went into this. (I describe the reasons
why in Chapter One.)