Menu

Search

Thursday, 6 December 2012

The Life Cycle of a Java Program


There are different types of programming languages. In some of them you write the text of the
program (aka the source code) and can execute this program right away. These are interpreted languages
(e.g., JavaScript).
But Java requires the source code of your program to be compiled first. It gets converted to either
machine-specific code or a bytecode that is understood by some run-time engine or a virtual machine.
Not only will the program be checked for syntax errors by a Java compiler, but some other libraries of
Java code can be added (linked) to your program after the compilation is complete (deployment stage).
In this lesson you write a very basic Java program that will output the words “Hello World” on your
computer’s screen.
Technically you can write the source code of your Java program in any plain text editor that you
prefer (Notepad, TextEdit, vi, etc.), but to compile your program you’ll need additional tools and
code libraries that are included in the Java Development Kit (JDK).



JDK and JRE
If you are planning to use a specific computer to develop Java programs, you’ll need to download
and install JDK. If you are planning to use this computer only to run Java programs that were compiled
somewhere else, you just need the Java Runtime Environment (JRE).If you have JDK installed on your machine, it includes JRE.Java’s platform independence comes from the fact that your Java program doesn’t know under which operating system (OS) or on which hardware it’s being executed. It operates inside the preinstalled JRE that is pretty much the same on every platform.Since you’ll be learning how to develop Java programs, download JDK from the following website:
http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html.




Java SE and EE
But before rushing to the downloading process, you need to get familiar with two more terms: Java
SE (Standard Edition) and Java EE (Enterprise Edition). The latter includes the server-side tools and
libraries that you’ll get familiar with starting in Lesson 26.
For now, just download the latest version of the JDK SE Development Kit. (The letter U followed by
a number represents the update number of Java 6.)
Select the platform (Windows, Linux, Solaris) on which you are planning to develop Java programs
and continue the download process.


No comments:

Post a Comment