An interactive, production-grade React application for mastering advanced Java/JVM concepts through visual simulations and deep-dive theory.
| Module | Description | Visualization |
|---|---|---|
| Garbage Collection | Eden, Survivor, Old Gen memory pools | Object allocation & GC cycles |
| Concurrency | Monitor locks, Entry/Wait sets | Thread state transitions |
| JIT Compilation | Tiered compilation (Interpreted → C1 → C2) | Profiling & optimization |
| Java Memory Model | CPU caches, Main Memory, Volatile | Cache coherence & visibility |
| Static vs Instance | Metaspace vs Heap memory layout | Static field sharing |
Each module includes comprehensive "Engineer's Guide" content covering:
- Under-the-hood JVM internals
- Best practices and anti-patterns
- Thread safety considerations
- Performance implications
Built following SOLID principles with a modular, scalable architecture:
src/
├── components/ # Reusable UI components
│ ├── Layout/ # Header, Layout wrapper
│ ├── UI/ # Button, Console, MemoryBlock
│ └── Hub/ # Module selection grid
├── features/ # Feature modules (one per topic)
│ ├── gc/ # Garbage Collection
│ ├── threads/ # Concurrency
│ ├── jit/ # JIT Compilation
│ ├── jmm/ # Java Memory Model
│ └── static/ # Static vs Instance
├── hooks/ # Custom React hooks (simulation logic)
├── contexts/ # React Context providers
├── types/ # TypeScript type definitions
└── App.tsx # Root application component
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/pramithamj/java-masterclass.git
cd java-masterclass
# Install dependencies
npm install
# Start development server
npm run devOpen http://localhost:5173 in your browser.
npm run build
npm run preview # Preview production build locallyThe app is configured for GitHub Pages deployment:
- Build the project:
npm run build - Push to your repository
- Enable GitHub Pages in repository settings (deploy from
gh-pagesbranch or/docsfolder)
Note: The
basepath invite.config.tsmust match your repository name.
Visualize the Generational Hypothesis in action:
- Eden Space: Where new objects are allocated
- Survivor Space: Objects that survive Minor GC
- Old Generation: Long-lived objects (tenured)
- Trigger Minor GC and Full GC to see object lifecycle
Understand Java's Monitor Lock mechanism:
- See threads competing for synchronized blocks
- Watch Entry Set (blocked) and Running states
- Visualize lock acquisition and release
Watch code get "hot" and tiered compilation kick in:
- Interpreted: Initial slow execution
- C1 Compiler: Quick compilation, basic optimizations
- C2 Compiler: Aggressive optimization (inlining, escape analysis)
Understand visibility and happens-before:
- CPU L1 caches vs Main Memory
- Volatile writes flush to memory
- Non-volatile reads may see stale data
Visualize where static and instance members live:
- Metaspace: Class-level static fields (shared)
- Heap: Per-instance fields (unique per object)
- See how static changes affect ALL instances
- React 19 - UI framework with hooks
- TypeScript 5.9 - Type safety
- Vite 7 - Fast build tool with HMR
- CSS Modules - Scoped styling
- ESLint - Code quality
- Single Responsibility (SRP): Each component/hook has one clear purpose
- Open/Closed (OCP): Easy to add new modules without modifying core
- Dependency Inversion (DIP): Contexts provide injectable dependencies
- Interface Segregation (ISP): Small, focused type interfaces
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the need for better JVM education tools
- Built with modern React best practices
- Designed for developers learning advanced Java concepts