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..

INTRODUCTION

Hello, World! Oh! That, as you might figure out later, is a two-parter. 
Programming isn’t something that you can learn right away (That’s from my point of view. I am no smarty. So, correct me if I am wrong). But you can begin to appreciate the concepts and just like mathematics, get better with practice. The best approach to programming, as i have discovered for myself, is going right into the business.Write code (not necessarily yours. I.e, you are free to check out a wide range of code samples online), Run it, Study the output and then go back to the source text and study each line making reference to the output for comprehension. 

Well, on to what this blog has to offer. Have you ever wished you could write code, probably for the fancy look of it, or u just love to type code that outputs an interactive interface for your friends or probably you are a student in an institution studying computer science or a particular programming language or yet, if you basically feel you should know how your computer reasons, the lessons that will follow are for you. 

The Programming language for this series will be Java for many obvious reasons. Now you might have heard about C++ as the most cpu-efficient programming language. Well, that’s not in doubt. And trust me, I’m in no place to argue. I didn’t invent any programming language, nor do i plan to in the future. But our reason for choosing java is this: 

Java boasts of portability (Independent of the Machine Architecture). This means that you can write your code without having to bother about a target machine. The JVM (Will be discussed later) Is the target of java code. 
Java was created with the c++ syntax and was greatly simplified for programmer-friendliness.

Basic Java principles will be taught and as we progress, a long-term project will be introduced.

Should you have any questions, feel free to drop comments!

Next post in a few days.

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.