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.
-
Click on “Accept License Agreement”.
-
Look for your operating system and then download and install the JDK.
-
Choose your operating system to ensure
JAVA_HOME
environment is set and points to your JDK installation-
Windows 7: Right click My Computer and select Properties.
Windows 8 and 10: Go to Control Panel > System > Advanced System Settings -
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 exampleC:\Program Files\Java\jdk1.8.0_144
.
-
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.
-
Open
/etc/environment
in any text editor likenano
orgedit
. -
Add the following line:
JAVA_HOME="PATH TO WHERE YOU INSTALLED JDK (i.e. /usr/lib/jvm/open-jdk)"
-
Use
source
to load the variables, by running this command:source /etc/environment
-
Check the variable, by running this command in a terminal:
echo $JAVA_HOME
. The output should be the path to your JDK.
-
Windows 7: Right click My Computer and select Properties.
**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