Java Development Setup on Mac

1 minute read

Java Development Environment Setup on MacOs

Setup Steps

  1. Create a development directory structure to work on Java programs
    • Open the terminal
    • Within your user home directory /Users/<user name>
    • Create a directory named devarea
      • mkdir devarea
    • Move into the devarea directory
      • cd devarea
    • Create the following directories
      • mkdir projects
      • mkdir repos
      • mkdir javaDev
  2. Verify java is installed and the version
    • Open the terminal
    • Type the following command to view the java version
      • java --version
  3. Verify the location of the java that is being used
    • Open the terminal to view the location of the java being used
    • Type the following command to
      • which java
  4. If needed, manually install Java
    • https://mkyong.com/java/how-to-install-java-on-mac-osx/#manual-install-java-early-access-builds-on-macos
  5. Set the JAVA_HOME variable that can be utilized by Maven and other Java development tools.
  6. Install Maven and set the MAVEN_HOME variable
  7. Install Intellij Toolbox
  8. Use Intellij Toolbox to install Intellij Idea
    • Download the regular version; Do not download the community
    • Set the license key for Intellij Idea