tquadrat.org

View on GitHub

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

  1. The Java Language Specification
  2. JVM Languages
  3. AWT and Swing
  4. Additional Libraries
  5. Debugging Tools
  6. JShell Startup Configuration
  7. 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

Java 21

Java 25

JVM Languages

Java is not the only language that can be executed on the JVM.

The Java Scripting API (JSR223)

The Java Scripting API describes how to use other languages for scripting inside a Java application.

AWT and Swing

Additional Libraries

Debugging Tools

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).

  1. Snippet

### Snippet