February 2025 š¤§
Java without IntelliJ, CLI tools
Since I wasnāt in the mood to read a lot of newsletters I wanted to share something else Iāve been tinkering with: finding a good setup for programming Java that doesnāt suck rely on IntelliJ š
As we touched on this topic at the Delivery Offsite last year I thought this might be interesting to some of you. If itās not relevant for you, you might still find some of the tools I mention valuable for other things.
Enjoy! And feel free to leave feedback if you found this helpful. š
First, if youāre happy with IntelliJ, great! This might not be for you, and Iām not trying to convince you otherwise. But I prefer to work in a specific way and am apparently too set in my ways to change:
- I prefer lightweight, responsive tools and canāt stand loading spinners or laggy UIs
- I favor small, focused tools over the kitchensink
- I like being āclose to the metalā and understanding whatās happening under the hood
- I want sensible defaults with minimal or no configuration
- I prefer dumb and simple for the most part:
console.log
> debuggers, string find + replace > refactoring
For frontend development, this means using VS Code for editing and a terminal with various CLIs for everything else (running tests, version control, ā¦). This approach is common in the frontend world. However, in the Java ecosystem, IntelliJ seems the default choice. Other options are less obvious. After some experimentation though, hereās my setup:
-
Editing & Autocompletions: VS Code with two extensions: Language Support for Java by Red Hat and Spring Boot Tools. These provide autocompletions, inline error messages, auto imports, and decent refactoring out of the box, without bloating VS Code with tons of extensions like some of the Java extension packs.
-
Keeping dependencies up to date:
./gradlew build --refresh-dependencies
-
Watch Mode Development: Such a normal thing in the frontend world, but surprisingly tricky in Java:
./gradlew build --continuous -x <loooooong list of tasks to exclude>
: Recompiles on changes (exclude tests and other checks for speed)./gradlew bootRun --continuous
: Restarts the app when build succeeds- Combined, these approximate something like
vite dev
, but slower š¤·āāļø
-
Test Watch Mode:
./gradlew test --continuous
(no build needed!)--tests "*.MyPackage"
: Runs only specified package tests-i
: Provides verbose output with stack traces- HTML reports are written to
build/reports/tests/
. Combine withnpx servor --reload
for readable, auto-refreshing test output in the browser āØ
-
Helpful Tools:
- Ghostty: My preferred terminal
- Just: Simplifies long commands or combines frequently used command sequences. As you saw, there are quite a few of these in this approach!
- Servor: Minimalist static file server
- Lazygit: For when you need to do more complicated stuff than
push
,pull
,commit -am
- tmux: For running multiple commands in split view (like continuous build + boot)
-
Debugging: Donāt know yet⦠still reluctantly reaching for IntelliJ when needed (only if I canāt get there with tests and console logs though)
-
Database Access: Previously I used IntelliJās database tools. I know DBeaver, itās ugly though š Open to recommendations!