Setup your system for java application development

By: zigmoid
Posted on: 02/09/2025

Carpenters working on a home construction site, using various tools to build the structure. Their tool bags are packed with icons representing essential development tools including Git, IntelliJ IDEA, Docker, Kubernetes, Java, GitHub, Eclipse, and Spring Tool Suite (STS). The scene combines traditional woodworking with a modern software development theme, symbolizing craftsmanship in coding.When you start your journey as a developer to create any project or application, you need a set of essential tools to assist you in the development process. These tools include programming languages, compilers, integrated development environments (IDEs), and version control systems, among others. Simply installing them is not enough; you must also configure them properly to ensure seamless operation and efficiency. Proper setup not only enhances your workflow but also helps you avoid common errors and compatibility issues, allowing you to focus on writing high-quality code and building robust applications.

 

Setting up a Java development environment involves installing essential tools, configuring the workspace, and ensuring everything is optimized for development. Here’s a step-by-step guide tailored for Java microservice development with Spring Boot.


1. Install Java Development Kit (JDK)

Since you are working with Java 8 (per your Spring Boot requirement), install JDK 8:

  • Windows/macOS/Linux: Download from Oracle JDK or use an OpenJDK version:
    • Windows: Install via Adoptium
    • Linux:
      sh
      sudo apt update && sudo apt install openjdk-8-jdk -y <span class="hljs-comment"># Ubuntu/Debian</span>
      sudo yum install java-1.8.0-openjdk-devel -y <span class="hljs-comment"># RHEL/CentOS</span>
  • Verify installation:
    sh
    java -version
    javac -version
  • Set Environment Variables:
    • Windows: Add JAVA_HOME to System Variables (C:\Program Files\Java\jdk1.8.0_xx)
    • macOS/Linux:
      sh
      <span class="hljs-built_in">export</span> JAVA_HOME=$(<span class="hljs-built_in">dirname</span> $(<span class="hljs-built_in">dirname</span> $(<span class="hljs-built_in">readlink</span> -f $(<span class="hljs-built_in">which</span> java))))
      <span class="hljs-built_in">export</span> PATH=<span class="hljs-variable">$JAVA_HOME</span>/bin:<span class="hljs-variable">$PATH</span>

2. Install Build Tools

Since you use Maven, install it:

  • Windows/macOS/Linux:
    • Download from Apache Maven
    • Or install via package manager:
      sh
      sudo apt install maven -y <span class="hljs-comment"># Ubuntu/Debian</span>
      sudo yum install maven -y <span class="hljs-comment"># RHEL/CentOS</span>
      brew install maven <span class="hljs-comment"># macOS</span>
  • Verify installation:
    sh
    mvn -version

3. Install IDE (Integrated Development Environment)

Since you’re working with Spring Boot, the best choices are:

  • IntelliJ IDEA (Recommended): Download from JetBrains
  • Eclipse IDE: Download from Eclipse

4. Install Database (Optional, but useful)

Depending on your project needs, install:

  • PostgreSQL:
    • Install: PostgreSQL Official
    • Start Service:
      sh
      sudo systemctl start postgresql
      sudo systemctl <span class="hljs-built_in">enable</span> postgresql
  • MySQL:
    sh
    sudo apt install mysql-server -y <span class="hljs-comment"># Ubuntu</span>
    sudo yum install mysql-server -y <span class="hljs-comment"># RHEL</span>
    • Start Service:
      sh
      sudo systemctl start mysql

5. Install Docker (For Microservices & DevOps)

Since you work with DevOps, Docker is useful for containerizing applications.

  • Install Docker:
    sh
    sudo apt install docker.io -y <span class="hljs-comment"># Ubuntu</span>
    sudo yum install docker -y <span class="hljs-comment"># RHEL</span>
    brew install --cask docker <span class="hljs-comment"># macOS</span>
  • Verify Docker:
    sh
    docker --version
  • Enable Docker to start on boot:
    sh
    sudo systemctl <span class="hljs-built_in">enable</span> docker
    sudo systemctl start docker
  • Run a test container:
    sh
    docker run hello-world

6. Install Postman (For API Testing)

Download from Postman to test your Dubai South Gate Pass API.


7. Setup Git for Version Control

  • Install Git:
    sh
    sudo apt install git -y <span class="hljs-comment"># Ubuntu</span>
    sudo yum install git -y <span class="hljs-comment"># RHEL</span>
    brew install git <span class="hljs-comment"># macOS</span>
  • Configure Git:
    sh
    git config --global user.name <span class="hljs-string">"Your Name"</span>
    git config --global user.email <span class="hljs-string">"youremail@example.com"</span>
  • Test Git:
    sh
    git --version

8. Install Spring Boot CLI (Optional)

If you prefer using Spring Boot CLI for faster development:

  • Install via SDKMAN:
    sh
    curl -s <span class="hljs-string">"https://get.sdkman.io"</span> | bash
    <span class="hljs-built_in">source</span> <span class="hljs-string">"<span class="hljs-variable">$HOME</span>/.sdkman/bin/sdkman-init.sh"</span>
    sdk install springboot
  • Verify Spring Boot:
    sh
    spring --version

9. Install Kubernetes (For Microservices Deployment)

If you plan to deploy microservices using Kubernetes:

  • Install Minikube (Local Kubernetes Cluster):
    sh
    curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    sudo install minikube-linux-amd64 /usr/local/bin/minikube
    minikube start
  • Verify Kubernetes Installation:
    sh
    kubectl version --client
    minikube status

10. Setup SSL Keystore for Secure APIs

Since your Dubai South Gate Pass API requires PKCS12 keystore, generate a keystore:

sh
keytool -genkeypair -<span class="hljs-built_in">alias</span> mykey -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore keystore.p12 -validity 3650

11. (Optional) Install Redis (For Caching in Microservices)

If you need Redis for caching, install it:

  • Ubuntu/Debian:
    sh
    sudo apt install redis -y
  • macOS:
    sh
    brew install redis
  • Start Redis:
    sh
    sudo systemctl start redis
    redis-cli ping

12. Create Your First Spring Boot App

Now that your environment is set up, create a Spring Boot application:

Using Spring Initializr

Visit Spring Initializr and select:

  • Project: Maven
  • Language: Java
  • Spring Boot Version: 2.7.x (Compatible with Java 8)
  • Dependencies:
    • Spring Web
    • Spring Boot Security
    • Spring Data JPA
    • Lombok
    • MySQL Driver (or PostgreSQL)

Download the generated project and import it into IntelliJ or Eclipse.

Or Create Manually with Maven

sh
mvn archetype:generate -DgroupId=com.example -DartifactId=myapp -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=<span class="hljs-literal">false</span>
<span class="hljs-built_in">cd</span> myapp
mvn clean install

13. Run a Simple Spring Boot App

  • Open src/main/java/com/example/myapp/Application.java
  • Modify it:
    java
    <code class="!whitespace-pre language-java"><span class="hljs-keyword">package</span> com.example.myapp;import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;

    <code class="!whitespace-pre language-java">@SpringBootApplication
    public class Application {
    public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
    }
    }

  • Run the Application:
    sh
    mvn spring-boot:run

Final Checklist

βœ… JDK 8 Installed
βœ… Maven Installed
βœ… IntelliJ IDEA or Eclipse Set Up
βœ… Docker Installed
βœ… Postman Installed
βœ… Git Configured
βœ… Database Ready (MySQL/PostgreSQL)
βœ… Spring Boot App Running