Friday, 25 February 2011

setting class path

Before writing your first java program you need to set class path.
to set the class we have two methods.
  1.  Temporary method:In this method first open the command prompt by typing cmd in run.
       Type the following code: 
      c:\>set path="%path%".;C:\Program Files\Java\jdk1.6.0_11\bin;
                                         
                 in the above statement set means it sets the path and dot(.) tells that sets the path to current directory which is specified the path and is the path where the java software is installed in your system.
        But using this method need to set class path at every time when you open new session or command prompt. 

  2.Permanent method(Default method):In this method we sets class path permanently need to set every time when you open the command prompt.to set the path follow bellow steps
step 1:Right click on my computer and select and open properties.
2.After opening window select advance menu
3.click the Environment variables 
4. select new user variable
5.After opening popup window enter variable name as "path" and
    variable path as your java installation path till to bin folder 
 6. your class paths visible  in your user variable category  
 
  

Difference between JDK,JRE,JVM

       JDK:Java development kit is the software bundle which is used to develop java programs.
       JRE:Java run time environmet which is used run the java programs.
JRE=Java virtual machine+Java Packages &Classes(like util, math, lang, awt,swing etc)+runtime libraries.
       JVM:Java Virtual machine provide paltform  independent execution.it means "write java ones and run any where " we can develop and compile the java program and we no need to worry about where it can be executed.Java programs can execute in any plat form.
   Using JRE we can run the any java class file(byte code) without JDK but using JRE we can't develop and compile java programs .If you want to develop java you need java packages and class and other tools which include in jdk.
    JVM is virtual because it is not physically exist it is not hardware.it coverts the java byte code into machine code corresponding to the operating system where it is run ,this mechanism provides  Java platform independence.
 Downloading Java Software: to install java in your system you have to install jdk and jre .but in latest jdk kit includes jre
 To download JDK including jre click the following link (its free):
http://www.java.com/en/    or
http://www.oracle.com/technetwork/java/javase/downloads/index.html in this web page click the java standard edition.
 unzip the source code using winrar or other tools double click on it and select the installation folder.
 

The Java History Timeline



1991
The Green Project Begins
MS DOS is the dominant operating system
Cell phones weigh half a pound
"Biosphere 2" project begins
1992
"Oak" is the language
*7 Debuts
"Duke" is featured in the Interface
Johnny Carson signs off "The Tonight Show" on NBC
1993
The Green Project becomes FirstPerson
Mosaic v1.0 is released
"Cheers" ends an 11-year run
1994
WebRunner released — the first browser that supports moving objects and dynamic executable content
The Apple QuickTake 100, the first consumer digital camera, goes on sale for less than $1,000
"Friends" debuts on NBC
1995
Java technology released to a select group on the Web site wicked.neato.org
The San Jose Mercury News runs a front-page article about Java technology
Name changed from "Oak" to "Java"
Announced at Sun World -- Java technology is officially born
1996
The first JavaOne Developer Conference
JDKtm 1.0 software is released
Chess computer Deep Blue defeats Garry Kasparov for the first time
"Dolly" the first cloned sheep is born
1997
Over 220,000 downloads of JDK 1.1 software occur in just three weeks
JavaOne draws 8,000 attendees, becoming the world's largest developer conference
Java Card 2.0 platform is unveiled
43% of U.S. families own a computer
1998
JDK 1.1 release downloads top 2 million
Visa launches world's first smart card based on Java Card technology
The Java Community Process (JCP) program formalized
"Who Wants to Be a Millionaire?" premieres in the U.K
1999
Java 2 platform source code is released
JavaOne draws 20,000
J2EE beta software is released
"Star Wars Episode I: The Phantom Menace" released
2000
Over 400 Java User Groups are established worldwide
Java Developer Connection program tops 1.5 million members
Steve Jobs joins Scott McNealy on stage at JavaOne to announce a major commitment by Apple in support of Java technology
Heavy Metal band Metallica sues Napster for copyright violations
2001
First international JavaOne conference in Yokohama Japan
Over 1 million downloads of the Java Platform, Enterprise Edition (Java EE) SDK
Google Inc. PageRank search algorithm patent awarded
"The Lord of the Rings: The Fellowship of the Ring" is released
2002
J2EE SDK downloads reach 2 million
78% of executives view J2EE technology as the most effective platform for building and deploying Web services
The Euro is introduced
"The Osbournes" becomes a surprise hit on MTV
2003
Java technology runs in almost 550 million desktops
Almost 75% of professional developers use Java programming language as their primary development language
Commercial Voice-Over-Internet (VoiP) phone service begins
"The Da Vinci Code" is published
2004
Java 2 Platform, Standard Edition 5 (Project Tiger) is released
The Java technology-powered Mars Rover (Spirit) touches down on Mars
Sun Java Studio Creator is launched
2005
Java technology celebrates its 10th birthday
Approximately 4.5 million developers use Java technology
Over 2.5 billion Java technology-enabled devices are available
java.com bundles the Google Toolbar with the JRE download
2006
Rich Green announces at the JavaOne 2006 Conference that it's not a matter of when Sun will open source Java technology, but how.
The NetBeans IDE 5.0 is released.
Sun open-sourced Java EE components as the Glassfish Project to java.net.
Java SE and ME initial components are released as open source.
Pirates of the Caribbean: Dead Man's Chest is released.
2007
Sun released the source code of the Class library under GPL on May 8, 2007
Java technology is in more than 5.5 billion devices and is used by more than six million developers.
The iPhone is released.
2008
JavaFX 1.0 is released
At JavaOne, Neil Young announces his Archives Project to be released on Blu-ray Disc™, powered by Java technology.
JDuchess Website Launched (for women using Java technology).
Facebook reaches 100 million users.
2009
Joe Darcy announces Project Coin, "to enhance the Java programming language with an assortment of small changes."
Java EE 6 is released with a simplified development and deployment model, RESTful web services, and the Java EE Web Profile.
The NetBeans IDE is developer.com's 2009 Product of the Year.
Barack Obama is inaugurated as the 44the President of the United States.
2010
Oracle acquires Sun Microsystems.
The JCP approves Java 7 and Java 8 roadmaps.
JavaOne 2010 is held concurrently with Oracle OpenWorld in September.
Spain wins the World Cup in South Africa.

Java History


Java is a pure "object-oriented programming language" which is developed in the early 1990's and it released in 1995 by James Gosling at Sun Micro systems. 
    Java is open source language .now a days every enterprise and mobile applications use java .java provides high security and it can be developed easily with is object oriented  concepts .Java has one mechanism to handle exception using the concept of Exception handling.
          In 1991, a small group of Sun engineers called the "Green Team" believed that the next wave in computing was the union of digital consumer devices and computers. Led by James Gosling, the team worked around the clock and created the programming language that would revolutionize our world – Java.
         the Green project became the Oak project became the Java project