Don't Guess. Verify.
Half of interview nerves come from not knowing your own setup. Before you prep the answers, prep the machine — run these and know exactly what you're working with.
⌨ Check your versions
Java (JRE)
java -versionopenjdk version "17.0.10" 2024-01-16
Runs the JVM. If this fails, Java isn't on your PATH.
Java (compiler)
javac -versionjavac 17.0.10
Comes from the JDK. If javac is missing you installed a JRE, not a JDK.
Maven
mvn -vApache Maven 3.9.6
Also prints the Java version Maven itself uses — a common gotcha.
Git
git --versiongit version 2.43.0
Pre-installed on most Macs/Linux; install from git-scm.com on Windows.
Python
python --versionPython 3.12.2
On some systems use python3. Check pip --version too.
Node.js
node -vv20.11.1
Bundled with npm — verify with npm -v.
npm
npm -v10.2.4
Ships inside Node. Mismatched versions cause most 'works on my machine' bugs.
Docker
docker --versionDocker version 25.0.3
Needs the Docker daemon running. Try docker ps to confirm it's alive.
Spring Boot
mvn spring-boot:run -versionSpring Boot 3.2.x (see pom.xml)
Defined by the parent version in pom.xml / build.gradle, not a global install.
Tomcat
version.sh (catalina)Server version: Apache Tomcat/10.1.x
Run $CATALINA_HOME/bin/version.sh (or version.bat on Windows).
⚙️ Configure & upgrade
🏠Set JAVA_HOME
- 1Find your JDK path (e.g. /Library/Java/.../Home or C:\Program Files\Java\jdk-17).
- 2macOS/Linux: export JAVA_HOME=$(/usr/libexec/java_home -v 17) in ~/.zshrc.
- 3Windows: System Properties → Environment Variables → New → JAVA_HOME.
- 4Verify with: echo $JAVA_HOME (or echo %JAVA_HOME% on Windows).
🛣️Add to PATH
- 1PATH tells your shell where to find commands like java and mvn.
- 2macOS/Linux: export PATH=$JAVA_HOME/bin:$PATH in your shell profile.
- 3Windows: edit the Path variable and add %JAVA_HOME%\bin.
- 4Open a NEW terminal so the change takes effect, then re-run java -version.
⬆️Upgrade the JDK (8 → 17/21)
- 1Install the new JDK (SDKMAN!, Homebrew, or the vendor installer).
- 2Point JAVA_HOME at the new version and update PATH.
- 3Bump <maven.compiler.release> (or sourceCompatibility) in your build file.
- 4Rebuild and run your tests — watch for removed APIs and reflection warnings.
⚙️Configure Maven (settings.xml)
- 1Global config lives in ~/.m2/settings.xml.
- 2Add <mirror> entries for a corporate Nexus/Artifactory proxy.
- 3Store repo credentials under <servers>, not in pom.xml.
- 4Run mvn -v to confirm Maven sees the right Java home.
Advertisement
Google AdSense slot