Setup Java Development on Windows : Git, Tomcat, Maven, Java JDK

This is a Java development setup that is a continuation of a long ago post regarding Eclipse setup. In this post I exclude the IDE and include Git and Tomcat, two common elements in a Java developers toolbox now.

Create the following environment variables (similar to updating you .bashrc file).

  • HOME = {drive}:\Source
  • SDKS_HOME = {drive}:\SDKs
  • TOOLS_HOME = {drive}:\Tools
  • Download and extract or install msi/exe.

    1. Downloaded Java JDK, the latest or the version of you choice. Make sure you get the correct one for you architecture (i.e. x86, x64,..).  When running the installer, place the JDK in %TOOLS_HOME%.  You will end up with something like C:\Tools\jdk_…
    2. Download Maven latest maven version and extract to %TOOLS_HOME%.  You will end up with something like C:\Tools\maven-3.2.5…
    3. Download Ant latest ant version and extract to %TOOLS_HOME%.  You will end up with something like C:\Tools\ant…
    4. Download Git installer for windows. Install complete with git bash.
    5. Download Apache Tomcat version that you’d want and extract to %TOOLS_HOME%.  You will end up with something like C:\Tools\apache-tomcat-7.0.59-windows-x64…

    Create the following environments variables

    The root directory for these applications will be the directory where you will find the bin folder and other application specific folders.

  • JAVA_HOME = %SDKS_HOME%\jdk_… to the root folder.
  • MAVEN_HOME = %TOOLS_HOME%\maven-… to the root folder.
  • ANT_HOME = %TOOLS_HOME%\ant-… to the root folder.
  • %CATALINA_HOME% = %TOOLS_HOME%\apache-tomcat-… to the root folder.
  • Append the following line to the system Path environment variable

    Don’t forget a semicolon after each new entry.

    • %JAVA_HOME%\bin
    • %MAVEN_HOME%\bin
    • %ANT_HOME%\bin
    • %CATALINA_HOME%\bin

    At this point you will be able to open the git bash window and run the following.

    • java -version
    • git --version
    • mvn –version
    • ant -version
    • For tomcat you will have to manually path over to tomcat bin and run “sh version”.  bash shell doesn’t convert c:\Tools\… correctly for this one.

    No comments: