This is a sandbox repository, mostly for experimentation in Java.
It can also serve as a baseline for other projects.
To run the "Hello World" application:
./gradlew :app:runThis is an example library containing thread-safe counters.
To run the stress test:
./gradlew :counter-example:installJcstressDist
java -jar \
counter-example/build/install/counter-example-jcstress/counter-example-jcstress.jar \
-m sanityNote the -m sanity option, which decreases the run time.
To run the benchmarks:
./gradlew :counter-example:installJmhDist
java -jar \
counter-example/build/install/counter-example-jmh/counter-example-jmh.jarTo run the server application:
./gradlew :rmi-example:server:runThe server application must be running for the client to be able to connect.
To run the client application:
./gradlew :rmi-example:client:runTo run the server application:
./gradlew :tcp-example:server:installDist
tcp-example/server/build/install/server/bin/server 9999The server application must be running for the client to be able to connect.
To run the client application:
./gradlew :tcp-example:client:installDist
tcp-example/client/build/install/client/bin/client localhost 9999Note that gracious error handling is not implemented; the user is confronted with stack traces instead. You can crash the server by dividing by zero.
To run the benchmarks:
./gradlew :tcp-example:integration:installJmhDist
java -jar \
tcp-example/integration/build/install/integration-jmh/integration-jmh.jarI try to list some common development steps here, for reference.
To build modules and run unit tests:
./gradlew testTo verify that there are no Checkstyle warnings:
./gradlew checkTo build Javadoc and verify that there are no warnings and errors:
./gradlew javadoc- Initialize directory structure of the new module.
- Create a
build.gradle.ktsin the module. - List the module in
settings.gradle.kts. - Add entry to
.gitignoreto ignore build files. - Document the module in this README.
To upgrade locked dependencies:
./gradlew resolveAndLockAll --write-locks