Java Stuff
Information about the Java programming language, the Java eco-system, the JVM itself, and about other programming languages that are implemented for the JVM. Here I collected various stuff related to these topics that I encountered in the past and found useful.
Contents
- The Java Language Specification
- JVM Languages
- AWT and Swing
- Additional Libraries
- Debugging Tools
- JShell Startup Configuration
- Code Snippets
The Java Language Specification
The “Java Language Specification” is the authoritative source for all questions concerning the Java programming language. See here for the various versions of the JLS and also the Java Virtual Machine Specifications for the various editions, beginning with Java 6. Both documents are available as PDF, too. See here for “The Java Language Specification, Second Edition”, covering the language as it was before Java 5.
For the currently relevant versions, the respective links are in the sections for that version, below.
Important changes were made in Java 5 (Generics, enum, static imports …), Java 8 (Streams, Lambdas, java.time, …), and Java 9 (Modules, …).
Local Variable Type Inference (the var) was introduced with Java 10, text blocks were finally added to the language with Java 15. Java 22 brought “_” as ‘unnamed variable’, although it was no longer allowed as a variable name already since Java 9.
Java 17
- JDK 17 Documentation
- Java® Platform, Standard Edition & Java Development Kit Version 17 API Specification
- Java Language Specification
Java 21
- JDK 21 Documentation
- Java® Platform, Standard Edition & Java Development Kit Version 21 API Specification
- Java Language Specification
Java 25
- JDK 25 Documentation
- Java® Platform, Standard Edition & Java Development Kit Version 25 API Specification
- Java Language Specification
JVM Languages
Java is not the only language that can be executed on the JVM.
- List of JVM languages
The Wikipedia article about the alternative JVM languages, with a current list of the various implementations. - Alternative Languages for the JVM
This article deals not only with languages that can be used with the Scripting API, but with other first class languages like Scala, too. - A Complete Guide to JVM Languages
This article deals mainly with alternative languages on the JVM, and ignores their use as script languages inside a Java application. - An Overview of the JVM Languages
Another article about the first class languages.
The Java Scripting API (JSR223)
The Java Scripting API describes how to use other languages for scripting inside a Java application.
- JSR 223: Scripting for the JavaTM Platform – The original Java Specification Request for Java Scripting
- Java Platform, Standard Edition Java Scripting Programmer’s Guide for Java 8
- Java Scripting Programmer’s Guide for Java 7
- Open Source Scripting Languages in Java
- Lua
- Python
AWT and Swing
- Using Headless Mode in the Java SE Platform
This article explains how to use the headless mode capabilities of the Java Platform, Standard Edition (Java SE, formerly referred to as J2SE). It is a little bit old, but still valid, as long as AWT (and Swing) are part of the Java Platform.
JavaFX does not provide a headless mode, but ifjava.awt.headless="true"is set, a JavaFX GUI will most probably not start, too.
Additional Libraries
-
ActiveMQ
Multi-Protocol Messaging -
Bouncy Castle
The Bouncy Castle project offers open-source APIs for Java that support cryptography and cryptographic protocols. This is the de-facto standard for Java cryptography. -
CommonMark Java
A Java library for parsing and rendering Markdown text according to the CommonMark specification. See also here. -
H2 Database Engine
An RDBMS implemented in pure Java. -
**HikariCP
A high-performance JDBC connection pool. -
**ICU
I18n utilities; for further details regarding this library and how to use it, see here. -
JavaFX
A library for the creation of sophisticated GUIs for Java programs; originally meant as a replacement for AWT and Swing it is now separated from core Java. -
JavaMail
The email Handling Library for Java, now named JakartaMail, maintained by the Eclipse Foundation. -
Java Parser
The de-facto standard for the parsing of Java source code. -
Java Secure Channel
A pure Java implementation of the SSH2, allowing to use for examplesftpfile transfer inside a Java program. -
JGit
Embedding Git in Java Applications. -
Lucene
Ultra-fast searching within a Java application; for further details, see here. -
Neo4J
A graph data platform; more than a database. -
XChart
A free Java library for the creation of charts.
Debugging Tools
- IBM Pattern Modeling and Analysis Tool for Java Garbage Collector (PMAT)
- IBM Thread and Monitor Dump Analyzer for Java (TMDA)
- IBM HeapAnalyzer
- Tagtraum GCViewer 1.29
- Tagtraum GCViewer 1.36
- Eclipse Memory Analyzer™
JShell Startup Configuration
Pre-load and execute code in JShell on startup.
Code Snippets
This is a collection of useful code snippets that are not necessarily worth to be implemented as a utility method (or they cannot be generalised).
### Snippet