Now go to the My Compute–> Right Click and go to the properties–> Click on the Advanced System Settings –> Go to the environment variables –> Click New and add a variable as PATH and paste the path of the bin folder you copied previously. In order to set it into the environment variables we need to know where the java has been installed and just copy the path till the bin for example it could be like this C:\Program Files\Java\jdk1.8.0_131.jdk\bin
Export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Homeįor Windows, we need to manually set up the java in the environment variables to be able to execute program from the command line.