Friday, March 30, 2012

Java Tutorial & Lesson 1 - Getting Started

Introduction to Java and Eclipse IDE

At the end of this level the reader will be able to:

  • Explain the global process of solution to a problem using a computer program. This includes the steps that must be followed to solve it and the different elements that should be produced while the solution is build.
  • Analyze a simple problem to be solved using a computer program, building a model with the elements involved in the problem and specifying the services the program must offer.
  • Explain the structure of a computer program and the role played by each of the elements that compose it.
  • Complete a partial solution to a problem (an incomplete program written in Java language), using simple expressions, method assignments and invocations. This implies understanding the concept of parameter and object creation.
  • Use a software development environment and a predefined workspace, to complete a partial solution to a problem.

So let's get started...

Download and Install The Java Development Kit (JDK)

First you need to download and install the Java Development Kit (JDK) for your Operating System. I would recommend downloading the latest version available.

Download and Install The Eclipse IDE

We also need an Integrated Development Environment (IDE) which will help you make the coding experience much more better. I highly recommend Eclipse IDE for Java Developers because it's very intuitive and will help you have a faster learning curve.

For the Java version y would recommend the latest version because it usually has more functionality and ease of use. The Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. Remember that currently the versions are preceded by a "1.", meaning that, for example, the 5th version is the version 1.5 and the 6th version the 1.6 and so on.

I personally recommend Eclipse for it is with this IDE that I learnt Java. At first it can be a little complicated because it has many options and menus but if you only focus on the important (coding) and once you get used to it you will write programs very fast. Some people wrongly state that Eclipse is only for Java development but actually the Eclipse Platform is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. By means of various plug-ins, it can be used to develop applications in various programming languages including Ada, C, C++, COBOL, Erlang, Java, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy and Scheme. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others. [ref]

(Note: If you are already familiar with Eclipse you can skip the Java Tutorial and Lesson 2 and go straight to the   Java Tutorial and Lesson  3)

Please feel free to comment and ask if you have any questions, your feedback will be greatly appreciated.