Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Sunday, August 20, 2017

Install Java on Windows 



This tutorial is about how to install Java on windows. This is pretty easy. Just follow the steps.


  • First download and install Java. To download java CLICK HERE.
  • After installing it we have to set the path variables correctly.
  • To do that go to My Computer.
  • Right click and click on "Properties".
  • Then click on "Advanced System Settings".
  • The click on "Environmental Variables".
  • Now under "System Variables" select the variable named "path" and click "edit".
  • Now go to the place where you have installed Java. Usually it's installed in Program Files in C drive.
  • Then inside "Java" folder select "jdk" folder and then again go to "bin" folder.
  • Now copy the path of the bin folder (See the picture below)

  • The path is usually like this C:\Program Files\Java\jdk1.8.0_101\bin
  • Now paste the copied path, appended by a semi colon in the "Variable value" in the dialog box which appeared after clicking Path variable previously. (Like shown in the figure below)
  • Now we have to do this again for "jre" as well. So don't close the dialog box.
  • Now again go to the place where java is installed and now select the "jre" folder and go to bin folder and copy the path.
  • Now paste the copied path in the "variable value" appended with a semi colon.
  • Now click Ok.
  • Now we need to set CLASSPATH.
  • You may have the ClassPath variable or not in the system variables.
  • If not create a new one giving the "CLASSPATH" for the variable name.
  • Now we need to set the variables values.
  • Now again go to the "Java" installed folder and go to "jdk" folder ad go to "bin" folder.
  • Copy the path again and paste it in the for "Variable Value" in the dialog box appended by a semi colon.
  • Now again go to "jre" folder and and go to "bin" folder and copy the path.
  • Then paste it in the "Variable Value" box appended by a semi colon and a dot.
  • Now click okay for all the dialog boxes.
  • Now open windows command prompt and type "java" and "javac".
  • You'll get an output like this



Now all the things are done correctly!!!













  • First you need to download MingGW.
  • Click here to download MingGW
  • After downloading it,double click and run the the downloaded application
  • It'll download some files after you running it, like shown in the figure below.

  • The it'll open up a window where you have to do some selections. Just do like what I've done in the picture below. 


  • What you have to do is put a tick mark to "mingw32-base" which will basically install the C compiler.
  • If you want to install C++ compiler put a tick mark to "mingw32gcc-g++" which I have done in the above picture.
  • Now just click the "Installation" menu and click "Apply Changes".
  • Then it'l start installing the C compiler which will take some time.
  • After finishing the installation open up command prompt and then just copy and paste the given code line below.
  • setx PATH "%PATH%;C:\MinGW\bin;
  • Now this sets the environmental variable path for GCC compiler ( if you don't know what's the path just ignore it, now the compiler has installed correctly )
  • Now everything is done!