Saturday, 2 March 2013

Getting started with JAVA

Setting up Java

In this post we will see how to set up Java Development Kit(JDK) and get started with JAVA programming.

What is JDK after all?

     JDK is java development kit.Sounds fancy? Basically JDK is nothing but set of libraries which can be used at compile and runtime when you start coding in java.Think of it as an environment needed to compile, debug and run you java programs.

    To describe it in one statement - The Java Development Kit (JDK) is a software development environment used for developing Java applications and applets. It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver (jar), a documentation generator (javadoc) and other tools needed in Java development.

     Before we proceed to downloading JDK it is important to know its types and purpose. We have JSE(java Standard Edition)  and JEE(Java Enterprise Edition).As long as you don't use any application servers or other advanced distributed architectures you will be perfectly fine with former one.
You can get Java JDK here. You can also check the difference between JSE and JEE in the previously mentioned link.After you download the JDK just unzip it and install.You may need to change enviroment variables if you are compiling and running programs from command line.

Where do i actually write my code?

You can write your code in any standard text editor notepad/notepad++ for Windows or vi/emacs for Linux.
For beginners its is recommended to write and compile on command line to get familiar with how things work but all you want is to write Java programs you can directly use IDE(Integrated Development Environment).There are two IDE's that are commonly used-
  1. Eclipse
  2. NetBeans
What i would recommend and use during these tutorials is Eclipse because it is most widely used and considerably light wight than NetBeans.Also there is no installation needed for Eclipse.You can download Eclipse from here. Go for Eclipse Classic than EE version if you are working with JSE.After downloading unzip it and execute eclipse.exe.You should see something like this
 


If it does not work you need to check your SDK installation.For windows check C:\Program Files\Java
directory if JRE and JDK folders are created.In next post we will see how to write our first Program.


No comments:

Post a Comment

t> UA-39527780-1 back to top