Friday, February 23, 2018

Getting Everything you need for Java

If you read the last post, then I’d like to start by welcoming you back. I’d also like to congratulate you for choosing to continue down this fun, yellow-brick road that is Java programming. Believe me when I say that once you go down this road, there’ll be no turning back. I mean, there’ll be many opportunities for you to turn back, but you’ll never want to.
In Java programming, you’ll learn how to make amazing things; and you can feel a lot smarter than your friends who can’t code. And as a bonus, you might even lose all hopes of a social life, and spend all you free time, hunched over your computer, typing away day and night while your life passes you by. In fact, you could have many sleepless nights, your bloodshot eyes glued to the screen, trying to figure out how a fix a code that you wrote but don’t fully understand. And then even if you want to stop, you won’t be able to, and you’ll realised that you’ve sold your soul to the code… forever!
Trust me, it’ll be fun.

Let’s Get Started

Now before you start writing code, the first thing you have to worry about is getting everything you need to actually start writing code. There are lot of important files and programs that you’ll need before your Java code can actually, and these things can be hard to keep track of and download, due to their size. And thanks to the internet, there are lot of websites that provide these files for download, and hard to be sure which one is authentic.
Basically, your problems start before you even start writing code.
So I’m going make all our lives easier by outlining the best place to get everything you need to code in Java.
The first thing you’ll need to write Java code is a place to actually write Java code. You can choose to do this using a basic text editor with no formatting properties like Notepad, to do this. That is, if you love to stress yourself, since to run and debug code on a text editor would take a long process. There are text editors, like Sublime Text and Notepad++, that are designed mainly for programming use; but the best thing to do, as a beginner, and even an expert programmer, is to use an IDE.

Whoa… what’s an IDE?

An Integrated Development Environment (or IDE for short), is an application software that allows the programmer to run, debug and test programs with convenience. Using an IDE makes life easier, really, since running code on it takes a fraction of the time used running code without one.
With so many programming languages around, there are also a lot of IDEs existing. Some of them already come with inbuilt compilers, while others require that you download the compilers separately. There are a lot of IDEs that are created specifically for Java programming, like Eclipse, IntelliJ and NetBeans.
For the purpose of these tutorial though, we’ll use NetBeans. It’s the most popular piece of programming software, it’s arguably one of the best, and the best part is… it’s free. And we all over things that are free. You’ll see what it looks like in a second, but before we can get it to actually run code, we’ll need to get some important Java components.

The first one we’ll look at is the Java Virtual Machine.

The Java Virtual Machine
If you had read the last post, then you’ll probably remember when I said that Java was platform independent. If you didn’t, well than now you know. To recap, this means that Java can run on any operating system, be it Windows, Linux or Mac OS (take that Apple!). The reason for this miracle is the Java Virtual Machine (also the Java Runtime Environment(JRE)), which is a separate platform that runs all Java code independently, regardless of OS. This is a very component to run code, and it should be your download priority if you ever wish to code in Java.
Java is owned by Sun Microsystems, and so to download it, you’ll need to go to their website. To do so, use this link:
Which should take you a webpage that looks like this:

Under the giant red “Free Java Download” button is a link that says “Do I have Java?”, click on this if you want to be sure that you have the JRE. If not, then you will be given the website will give you the opportunity to get it.
After the download and installation, you might need to restart your system. By the time your system is done booting, you’ll have successfully installed the Java Virtual Machine.

The Java Software Development Kit

At long last, we have the treasure JRE/JVM (whatever you prefer to use). Now we can write all the codes we want, right? Right? Well, actually, you would be wrong. You see, the virtual machine only allows you to run code, but it doesn’t provide the mean to actually write it. To do this you need something called the Software Development Kit.
Luckily, Java has a specialized Software Development Kit (which is conveniently called the Java Software Development Kit, or JDK for short). Now if you wish to download it, simply click the below link:
…which should take you to the webpage below:

What we need to get is the Java SE (Standard Edition). The latest update is Java SE9, but I would recommend Java SE 8, since that’s what I’m using, and I’m not sure what new features have been added. You can click “Java SE” under “Top Downloads”, or just go to “New Downloads and pick your choice.
If you picked Java SE 8 (though I’m sure it’s most likely the same with the other options), you should be taken to the following page:
Since we’re going to be using NetBeans, proceed to click the link that says “NetBeans with JDK 8” or whatever it says based on which JDK you picked.
And is it finally over? Do I have the fabled NetBeans and JDK? Do I finally have everything I need to be a mad-ass Java expert?
Unfortunately, no. Well, not yet anyway. See, after clicking that link, you should be taken a page where you will be required to pick the JDK based on your operating system (Don’t worry. This won’t affect the platform independence of Java). After this, you should finally be able to download the JDK.

Now that that’s over…

Before you wipe the sweat off your face and pat yourself in the back, keep in mind that the JDK costs over 200 megabytes, and so will be a pain to download (especially if you’re on really slow internet). Since it’ll also take quite a while to install everything, I might as well end here. I’m sure by the next post, you would have successfully installed the NetBeans Software, and you would finally be able to write and run Java programs.
Next week, I’ll be discussing the NetBeans Software and you’ll finally take your baby steps and write your first piece of Java code. Before then, you could try getting familiar with the software. Play around with some, and try to understand how some things work. Don’t worry about messing anything up, that’s how you learn.

I hope you like the post , if you have any issue please leave us a comment .

Thanks for reading


Post a Comment