Social Icons

Monday, 24 February 2014

History of Java Evolution

To execute a java program, it needs to have a Java Virtual Machine (JVM) in our computer system. There are two ways to build JVM in our computer system. They are

1. to install a Java Development Toolkit (JDK)
    JDK is a complete java toolkit for java developers.

2. to install a Java Runtime Environment (JRE)
    JRE is a minimum requirement which is just to run a java program.

JDK 1.0 (23 Jan 1996)
Codename: Oak
   - it is first version of java
   - it is really small, about 212 classes and 8 user packaages
   - it has abstract windowing toolkit (awt) package was too primitive
   - it has java applets

JDK 1.1 (19 Feb 1997)
   - it has 504 classes and 23 packages
   - it supports the following:
       delegation event model
       anonymous and inner classes
       java beans api
       remote method invocation (RMI)
       jar file format
       digital signatures
       awt enhancements
       object serialization
       reflection api

J2SE 1.2 (8 Dec 1998)
Codename: Playground
   - it has 1520 classes and 59 packages
   - it introduces java technology, Java SE (Standard Edition)
   - it introduces
       swing classes which have "pluggable look and feel" (PLAF)
       2D api
       drag and drop
       audio enhancements: play midi, wav, aiff, au files
       security enhancements
       ArrayList, BufferedImage

J2EE (Java 2 Enterprise Edition)
   - Server side components
       Servlets
       Enterprise Java Beans (EJBs)
       Java Server Pages (JSPs)
       Java Database Connectivity (JDBC)
       J2EE connectors

J2SE 1.3 (8 May 2000)
Codename: Kestrel
   - it has 1840 classes and 76 packages
   - it has the bundle of the HotSpot JVM
   - it supports the following:
       JavaSound
       Java Naming and Directory Interface (JNDI)
       Portable Network Graphics (PNG) format
       java.math package
       Timer class
       StrictMath class
       Print class
       java.media.Sound class
       RSA code signing

J2SE 1.4 (6 Feb 2002)
Codename: Merlin
   - it has 2991 classes and 135 packages
   - it supports the following:
       regular expressions
       exception chaining
       integrated XML
       XSLT processor (JAXP)
       Java Web Start
       Popup and PopupFactory classes
       JDBC 3.0 API

JCP is the mechanism for developing standard technical specifications for Java technology.

JSR is the actual description of proposed and final specifications for the Java platform.

J2SE 1.4.1 (16 Sep 2002)
Codename: Hopper

J2SE 1.4.2 (26 Jun 2002)
Codename: Mantis

J2SE 5.0 (30 Sep 2004)
Codename: Tiger
   - it supports the following:
       for each loop
       generics
       autoboxing
       var-args
       Formatter
       Scanner
   
J2SE 6 (2 Dec 2006)
Codename: Mustang
   - it has additional collection framework
       Deque
       BlockingDeque
       NavigableSet
       NavigableMap
       ConcurrentNavigableMap
   - it has enhancements in java.lang.instrument package
   - it supports the following:
       readPassword method of Console class
       enhancements in JAR, ZIP api, Java Web Start and Java Network Launching Protocol (JNLP)

Java SE 7 (7 July 2011)
Codename: Dolphin
   - binary number can be an integral type
   - Underscore characters in digits
   - Strings can use in switch keyword
   - a new statement of try-with-resources
   - multiple exception can be in single catch
   - NIO 2 api
   - JDBC 4.1 api
   - Stream Control Transmission Protocol (SCTP)
   - Sockets Direct Protocol (SDP)
   - a new instruction invokedynamic into JVM
   - fork/join framework to concurrency api
   - Nimbus look and feel
   - M Beans api
   - Elliptic Curve Cryptographic (ECC) algorithms
     

Features of Java

Small
The  size of Java executable code is really smaller than the size of similar code generated by C++.

Object Oriented
Java uses object reference which is object oriented.

Simple
Being object oriented, Java is simple to learn. Java learning curve is only one small jump smoothly.

Platform Independent
Java uses a common platform which can understand by Java Virtual Machine (JVM).

Secure
JVM contains a bytecode verifier. It doesn't have direct access to the operating system resources.

Multithreaded
Java has a feature of concurrency .

Dynamic
Java has a kind of just in time interpreter.





Friday, 21 February 2014

Easy Way to Learn How Java Work

As you know, Java is popular in IT era. One of the main reasons why Java is popular is that it is free. Any one can use it. Normally you may think the free one will not provide the best quality. But it's not always true. One of the exceptions is Java . Are you amazed? Let's continue our article. This article is suitable for new guys who are going to learn Java . 

Java was released by Sun Microsystem in 1996 publicly. Their slogan is "Write Once, Run Anywhere" (WORA). Once we have written a Java program, and then we can run that program any environment. 

How can Java do that? Java architecture has Java Virtual Machine (JVM). It designs to be a simple paradigm without any complexities compared with C language.

Supposedly I am working at a multinational company. we have many foreigners who come from different countries. Of course different countries use their different languages. Problem is communication. To do a communication, we have to have a common platform which we all can understand. Let's say we select English as an official language at our office and then English will be a common platform for us. Please see the following figure 1.


Based on the above figure, we can easily see the following two steps:
1. to establish English channel as a common platform
2. to interpret that English for specific native language

Similarly, it uses Java Byte Code as a common platform which Java Virtual Machine (JVM) can understand. Two processes are the following

1. to establish a Java Byte Code code as a common platform
2. to interpret that Java Byte Code for dedicated OS executable instructions and run


To run a Java program, it needs to do two JVM processes. So what do we need to run a Java program? Yes, we need only one which is JVM in our computer system. That's all. To conclude, any computer system which has JVM, can run any Java programs.