Thursday, October 29, 2015

SETTING UP YOUR WINDOWS ENVIRONMENT FOR JAVA PROGRAMMING

This tutorial guides you on how to download and set up Java on your computer (windows in this case).

The Java Development Kit (JDK) Is available for download freely from here 

Instructions are available on how to download the JDK particular to your system. Once the download is complete, run the .exe file to install Java. Take note of the install directory as this will be required later the [Assume the directory is C:\Program Files\java\jdk]. Once the installation is complete, you need to setup environment variables to point to the correct installation directories. This is important for access to the JDK and even though you have Java installed, your computer will not find your Java compiler on its own if this is not set.

To set the environment variables, follow these steps:

* right click on “my computer” and select Properties

* click on the “Advanced tab” and then “environment variables” button

* now edit the “path” variable so that it contains the path to the Java executable. N.B. Do not delete any text present in the text field, rather you type a semicolon (;) after the text present. That is if you have “C:\CHUxMyKëL\theartofcodingfiles”, Change it to “C:\CHUxMyKëL\theartofcodingfiles;C:\Program Files\java\jdk\bin”.

To write code in any programming language, you will need a text editor. Windows comes with one by default. It is known as “Notepad”.

But rather than use the stand-alone text editors, IDEs are a far better option. (My opinion though. Do not judge me for being lazy)

An IDE (integrated development environment) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE usually consists of a source code editor which is a text editor like Notepad, build automation tools (which compiles code automatically) and finally a debugger. More information on IDEs here

In these series, we will use NetBeans as our IDE to make life easier. (writing code is enough worry for us, Let the IDE compile our code and detect our errors on our behalf)

In the next lesson, we will go through writing a program and run it using the NetBeans IDE. 

And don’t forget to bookmark chuksmyk.blogspot.com for more on this subject. You could also check out theartofcoding.tumblr.com for basically the same post. Which ever is convenient for you

Until next time, be well..

No comments:

Post a Comment