Java Installation and Configuration¶
-
Install Java using Chocolatey:
-
JAVA_HOME (Run in PowerShell as Administrator):
-
Add Java to PATH (Run in PowerShell as Administrator):
-
Verify installation (open a new PowerShell window):
-
Install Java:
-
Add Java environment variables to your shell configuration (for zsh):
-
Create a helper function to switch Java versions (optional):
-
Reload shell configuration:
-
Verify installation:
Troubleshooting¶
If Java command is not recognized after installation: 1. Open System Properties (Win + R, type sysdm.cpl
) 2. Click "Environment Variables" 3. Verify JAVA_HOME exists and points to correct directory 4. Verify Path includes %JAVA_HOME%\bin
5. Open new command prompt to test
- "Java command is not recognized":
- Verify JAVA_HOME
Additional Configuration Tips¶
-
Create a
.gitconfig
file in your home directory: -
Add basic Git configuration:
-
Recommended aliases for your
.zshrc
: -
Recommended Git helpers
-
Java and Maven helpers
-
Git helpers