The Networking Group

The networking group is a set of developers interested in the design, implementation, and maintenance of the Java networking libraries.

Introduction

The source code for the networking part of the core libraries is spread over a few hundreds files making for a total of, approximately, 70,000 lines of code. 50,000 of these are java code, while the rest is native (i.e. C) code. While this is not massive, due to the tricky nature of cross-platform support, some guidance is needed before you take upon the task of tinkering with that beast.

Projects

Source structure

The networking source code resides mostly in these directories:

Building the networking libraries

First, be aware that the networking components have interdependencies with quite a few other parts of the JDK. Even more so, it's one the components at the foundations of the JDK, so always make sure you can rebuild everything from scratch after you've made changes.

Now, there are 2 areas where makefiles, and related files, are located:

If you go to any of these 2 subdirectories you can issue a make command and quickly compile your changes in either package.

Testing your changes

As a rule, unit tests, for new functionality, and regression tests for fixes are mandatory. Which means you should provide a unit test for pretty much any change you make. The test directories follow the same structure as the others:

Not only should you write tests for your changes but you should always run all the existing tests in these directories before submitting them. Moreover, because of the dependencies, it is highly recommend to also run the regression tests for the security components since the networking code is highly sensitive to security. These are located in test/java/security and test/sun/security. Needless to say, if any of these tests fails, then you should investigate and fix the issue, or back out your changes.

Remember, there is no such thing as too much testing.

Documentation

Community