Build your first Java app

Install JDK

Before running and deploying this sample, you must have JDK installed. If you have JDK installed, proceed directly by clicking “I have installed JDK” on the bottom.

  1. Go to the download page for Java SE Development Kit (JDK):

  2. Click on “Accept License Agreement”.

  3. Look for your operating system and then download and install the JDK.

  4. Choose your operating system to ensure JAVA_HOME environment is set and points to your JDK installation

    1. Windows 7: Right click My Computer and select Properties.
      Windows 8 and 10: Go to Control Panel > System > Advanced System Settings
    2. On the Advanced tab, select Environment Variables, and then create a new Systems Variable called JAVA_HOME and point it to where the JDK software is located, for example C:\Program Files\Java\jdk1.8.0_144.

    3. Check you have set the variable correctly by opening up command prompt (run + cmd) and typing echo %JAVA_HOME%. The output should be the path to your JDK.
    1. Open /etc/environment in any text editor like nano or gedit.
    2. Add the following line: JAVA_HOME="PATH TO WHERE YOU INSTALLED JDK (i.e. /usr/lib/jvm/open-jdk)"
    3. Use source to load the variables, by running this command: source /etc/environment
    4. Check the variable, by running this command in a terminal: echo $JAVA_HOME. The output should be the path to your JDK.

**Installing the JDK might take a couple minutes depending on the platform you’re using for development.

I ran into an issue I have installed JDK