Monday 24 January 2011

Lets Start ... Hello World ( JAVA Code )

Now lets start the coding phase with a hello world JAVA program


To Download The ".java" file Press Here 


Saturday 22 January 2011

Before Coding (Platform Issue)

Why Java is most commonly used by developers ?? why do they prefer to develop using Java ??


The Answer Is .... Because Java Is Platform independent

What Does This mean !!

being a Platform independent means that It works on any Platform any OS (Operating System )

Java runs on windows
Java runs on Linux
Java runs on mobile phones ....etc.

The JVM (Java Virtual Machine ) is the creator of Platform Independency , because the JVM created a virtual machine on your machine regardless the machine architecture .

So Java Can run On any Platform , All what you need is to install the JVM on this platform ..  

Before Coding (Java Program Life Cycle)

We knew Form The articles before the JDK and the diffrence between it and the JRE , also we knew what is a complier and what we will use for writing a Java program

BUT How Does the machine understand the code that i write , We all Know That The machine understand only the machine code (0-OR-1) .. So We have to know How the Code that i write can be understood by the machine

JAVA PROGRAM LIFE CYCLE :

1 - You write Your code in a text editor (Ex. Notepad )  Or in an IDE (Ex. Netbeans) The File Saved From The compiler (IDE) Or the text editor is ".JAVA" (Ex. program.Java)

2- Then when you compile your code the file ".JAVA" is compiled to be ".Class" (Ex. program.Class)

3 - Now you have the ".Class" file Portable which can run On any Platform

4 - The ".Class" file is Interpreted By The JVM  (Java Virtual Machine ) And The JVM turn the Code That You wrote to machine code ..

Java Life Cycle
   

Friday 21 January 2011

Before Coding (Compiler)


If you didn't read before coding (JDK) Please Read It From Here 
_____________________________________________________________

After Downloading The JDK & Installing It  ... 

Now We Came To Downloading The Complier Or IDE (Integrated Development Environment ) 
First .. Let Us Know What Is A Compiler ?
Compiler Is a program that You write a code in it and It translate the code into machine code 
But .. I Can't Write Any Programming Language In Any Compiler ... How ?
Each compiler has its own programming language ... 
Example :
To Write Java I Need Compiler Like Netbeans , Eclipes , ... ect
but There are compilers that have the option to Install Plug-ins to allow the users to Write another Languages 

In My Codes I Will use Netbeans 6.9 (Windows Version )compiler 
To Download It press Here

Before Coding (JDK)

What Do You Need To Develop A  Java Code ?
1. JVM (Java Virtual Machine )
2. Java Compiler
3. Syntax Knowing

Now We Will Take The First Two Requirements To Develop
1. JVM
              As We Knew before Java runs on a virtual machine regardless of the computer architecture
There Are two types of Jvm's
JRE JDK
Java Runtime Environment Java Development Kit
If You Want To Run Java (Games , Applications , ...ect) Only If You Want To Develop Java (Games , Applications , ...ect) (Includes JRE)

We Will Use In Developing As Shown JDK (Windows Version ) .. To Download It Press Here .
To Download JDK (V1.6 U23)  For  Different Versions (linux , Solaris , ...ect ) Press Here


How To Install JDK




History of "Java"


History Of Java


Java is a programming language (High Level Language) originally developed by James Gosling at Sun Micro-systems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. It derives much of its syntax from C and C++ but has a simplerobject model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, and is widely used from application software to web applications.
The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun re-licensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java, GNU Classpath, and Dalvik.