Java Development Tutorial#

Welcome to the Java development tutorial! This step-by-step guide will teach you everything you need to know to become productive with Java development in Neovim.

Note: This tutorial focuses on Java. For Rust-specific features and workflows, see the Rust Development Guide.

What You’ll Learn#

By the end of this tutorial, you’ll be able to:

  • Set up and navigate a Java project in Neovim
  • Write Java code with intelligent auto-completion
  • Create classes, packages, and manage project structure
  • Navigate large codebases efficiently
  • Debug Java applications
  • Run and manage JUnit tests
  • Use self-hosted AI coding assistants (via Ollama)

Prerequisites#

Before starting, make sure you have:

  • Neovim 0.9+ installed
  • JDK 11 or later
  • Neovim4j configuration installed (see Installation Guide)
  • Basic familiarity with Vim motions (or willingness to learn as you go)

Tutorial Structure#

This tutorial is divided into 10 progressive lessons:

  1. Project Setup - Creating your first Java project
  2. Hello World - Writing and running your first program
  3. Code Completion - Using IntelliSense and auto-completion
  4. Creating Classes - Managing Java classes and files
  5. Managing Packages - Organizing code with packages
  6. Buffer Navigation - Working with multiple files
  7. Code Navigation - Finding definitions, references, and more
  8. Debugging - Setting breakpoints and debugging code
  9. Testing - Running JUnit tests
  10. Workflows - Real-world development scenarios

How to Use This Tutorial#

  • Follow in order: Each lesson builds on the previous one
  • Hands-on practice: Try every example yourself
  • Take your time: Don’t rush - mastery comes with practice
  • Keep references handy: Have the Quick Reference open while learning

Time Commitment#

  • Quick learner: 2-3 hours to complete all lessons
  • Thorough learner: 4-6 hours with practice exercises
  • Beginner to Vim: Add 1-2 hours for Vim basics

Ready to Start?#

Let’s begin with Lesson 1: Project Setup!


Need help? Refer to the Quick Reference for keybinding cheat sheets.