Awesome Java

Published: 2019-08-04, Updated: 2023-05-31


Comunicação IPC


JVM exe launcher para windows

Fazer attach em JVM

Jmx Console

Injeção de dependencias

Api rest para testes



What can OpenTelemetry do for me?

OTel has broad industry support and adoption from cloud providers, vendors and end users. It provides you with:

With support for a variety of open source and commercial protocols, format and context propagation mechanisms as well as providing shims to the OpenTracing and OpenCensus projects, it is easy to adopt OpenTelemetry.

What OpenTelemetry is not

OpenTelemetry is not an observability back-end like Jaeger or Prometheus. Instead, it supports exporting data to a variety of open source and commercial back-ends. It provides a pluggable architecture so additional technology protocols and formats can be easily added.


Annotation Processor

Embedded Postgres para testes

testRuntimeOnly enforcedPlatform("io.zonky.test.postgres:embedded-postgres-binaries-bom:12.2.0")

Ferramenta para fazer releases

Especificando a versao que sera feito o release

./gradlew release -Prelease.releaseVersion=2.7.0

Configurando o gradle

confirmReleaseVersion.doLast {

	println "> upgrading docker-compose version=${project.version}"

	updateVersion("${project.projectDir}/docker-compose.yml", "(image:.*:)(.*)", "\$1${project.version}")

	def sout = new StringBuilder()
	def proc = ['git', 'commit', '-a', "-m [Gradle Release Plugin] - releasing '${project.version}'."].execute()
	proc.consumeProcessOutput(sout, sout)
	println "> $sout"


void updateVersion(f, pattern, replace){

	f = file(f)
	println "> updating version in: ${f}"
		println "file ${f} not found"
	f.write(f.text.replaceAll(pattern, replace))


Frameworks para commandline

1 - jcommander


2 - apache commons cli

Docker Java / Docker for Java

Ouvir eventos

// DockerClient setup
DockerClientConfig dockerClientConfig = DefaultDockerClientConfig.createDefaultConfigBuilder()
DockerClient dockerClient = DockerClientImpl.getInstance(dockerClientConfig)
                .withDockerCmdExecFactory(new NettyDockerCmdExecFactory());

// Running in a seperate Thread
ResultCallback<Event> callback = new ResultCallback<Event>() {

            public void onStart(Closeable closeable) {

            public void onError(Throwable throwable) {
                System.err.println("Error " + throwable);

            public void onComplete() {

            public void close() throws IOException {
                System.out.println("Closing Eventhandler");

            public void onNext(Event item) {
                System.out.println("Event: Event");


demos commands, demo commands, java commands, java examples, java bookmarks, java awesome

Spark Commands Como Instalar Ubuntu e Windows sem quebrar o bootloader