Homebrew tap for JDK 26 Project Valhalla builds with automated updates, CI/CD, and support for both macOS and Linux.
Project Valhalla is an OpenJDK project focused on improving Java's performance and memory efficiency through fundamental language enhancements.
Value Classes and Objects (JEP 401) - The cornerstone of Project Valhalla:
- Value Classes: New type of class that represents pure data without object identity
- Flattened Memory Layout: Value objects stored directly in memory without indirection (no object header overhead)
- Improved Cache Locality: Better CPU cache performance through memory layout control
- Zero-Cost Abstraction: High-level abstractions without runtime overhead
- Enhanced Generics: Support for specialized generics over primitive and value types
- Reduced Memory Footprint: Value objects eliminate object headers, reducing memory usage by 50-80% for small objects
- Improved Cache Performance: Direct memory layout means fewer cache misses
- Better GC Performance: Fewer object references mean less garbage collection pressure
- Faster Array Operations: Arrays of value types stored contiguously without indirection
Valhalla is particularly beneficial for:
- High-performance computing and scientific applications
- Financial systems requiring low latency
- Game engines and graphics processing
- Big data processing and analytics
- Any application with large collections of small objects (e.g., Point, Complex, Vector2D)
This tap provides the latest Project Valhalla early-access builds implementing JEP 401.
brew tap Artagon/jdk26valhalla
brew install --cask jdk26valhallaThe cask installation places JDK in /Library/Java/JavaVirtualMachines/jdk-26-valhalla.jdk and integrates with macOS's Java management system.
brew tap Artagon/jdk26valhalla
brew install jdk26valhallaThe formula installation creates symlinks in your Homebrew bin directory.
JDK 26 Valhalla Build 26-jep401ea2+1-1 (Released: 2025-10-10)
This build implements:
- JEP 401: Value Classes and Objects
- Automatic Updates: Weekly checks for new Valhalla builds with automated formula/cask updates
- Multi-Platform Support:
- macOS: ARM64 (Apple Silicon) and x64 (Intel)
- Linux: ARM64 (aarch64) and x64
- CI/CD Validation: Automated testing on every commit across all supported platforms
- GitHub Releases: Automatic release creation when new versions are detected
- Flexible Installation: Choose between cask (macOS system integration) or formula (Homebrew-managed) installation
- Integrity Verification: SHA-256 checksum validation for all downloads
| Platform | Architecture | Cask | Formula | Status |
|---|---|---|---|---|
| macOS 13+ | ARM64 (Apple Silicon) | ✅ | ✅ | Fully Tested |
| macOS 13+ | x64 (Intel) | ✅ | ✅ | Fully Tested |
| Linux | ARM64 (aarch64) | ❌ | ✅ | Fully Tested |
| Linux | x64 | ❌ | ✅ | Fully Tested |
Note: Cask installation is macOS-only and integrates with the system's Java framework at /Library/Java/JavaVirtualMachines/. Formula installation works on both macOS and Linux, placing files in the Homebrew prefix.
After installation, you may want to set JAVA_HOME:
For cask installation:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-26-valhalla.jdk/Contents/Home"For formula installation:
export JAVA_HOME="$(brew --prefix jdk26valhalla)"java -version
# Should output: openjdk version "26-jep401ea2" ...Project Valhalla introduces value classes that provide better performance and memory efficiency:
// Enable preview features to use value classes
javac --enable-preview --release 26 MyValueClass.java
java --enable-preview MyValueClassThe tap is automatically updated with new Valhalla builds. To update to the latest version:
brew update
brew upgrade jdk26valhalla # or brew upgrade --cask jdk26valhallaFound a problem? Open an issue using our issue templates.
This repository uses GitHub Actions to automatically maintain the latest Valhalla builds:
- Weekly Checks (Sundays at 12:00 UTC): Automated script checks jdk.java.net/valhalla for new builds
- Multi-Platform Download: Downloads and verifies binaries for all supported platforms:
- macOS: ARM64 and x64
- Linux: ARM64 and x64
- SHA-256 Verification: Calculates checksums for all platform binaries
- Automated PR Creation: Creates pull request with updated formula/cask when new version detected
- CI/CD Validation: Runs comprehensive tests across all platforms:
- Syntax validation for Ruby code
- Installation tests on macOS 13, macOS 14, Ubuntu 22.04, Ubuntu 24.04
- Runtime verification (Java version check and basic compilation)
- Auto-Merge: PR automatically merges after passing all tests
- GitHub Release: Creates tagged release with version notes
You can manually trigger an update check:
# Via GitHub CLI
gh workflow run update.yml -R Artagon/homebrew-jdk26valhallaOr visit the Actions tab and click "Run workflow".
- JEP 401: Value Classes and Objects - Official JEP specification for value types
- Project Valhalla Home - Main project page with overview and goals
- Early Access Downloads - Official download page for Valhalla builds
- Early Access Build Info - Build information and release notes
- Latest JEP 401 Specification - Detailed technical specification and implementation notes
- API Documentation - JavaDoc for Valhalla early-access builds
- State of Valhalla (Brian Goetz) - Series of documents explaining Valhalla's design and evolution
- Valhalla Mailing List Archives - Development discussions and technical details
- Introduction to Project Valhalla - Getting started with value types
- Java Language Futures (Brian Goetz) - Conference talks about Valhalla
- OpenJDK Valhalla Updates - Wiki with status updates and design documents
- Valhalla Dev Mailing List - Join the development discussion
- OpenJDK Wiki - Valhalla - Design documents and specifications
- GitHub Discussions - Ask questions about this tap
Remember that Valhalla builds include preview features requiring the --enable-preview flag:
javac --enable-preview --release 26 YourCode.java
java --enable-preview YourClassThis tap is distributed under the same license as OpenJDK (GPL-2.0 with Classpath Exception).
These are early-access builds provided for testing and development purposes. They implement experimental features that are subject to change. They are not intended for production use. For production environments, please use stable JDK releases.
Important: Project Valhalla builds include preview features that require the --enable-preview flag to use. The APIs and language features are subject to change in future releases.