Wecome Java.

Java is a high-level programming language originally developed by Sun Microsystems and released in 1995.Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. As of December 08 the latest release of the Java Standard Edition is 6 (J2SE). With the advancement of Java and its wide spread popularity, multiple configurations were built to suite various types of platforms. Ex: J2EE for Enterprise Applications, J2ME for Mobile Applications.Sun Microsystems has renamed the new J2 versions as Java SE, Java EE and Java ME respectively. Java is guaranteed to be Write Once, Run Anywhere.

Friday, October 19, 2012

Java Environment

Java environment includes a number of development tools, classes and methods. The development tools are part of the system known as Java Development Kit (JDK) and the classes and methods are part of the Java Standard Library (JSL), also known as the Application Programming Interface (API).

Java Development kit (JDK) – The JDK comes with a set of tools that are used for developing and running Java program.
It includes:
1. Appletviewer( It is used for viewing the applet)
2. Javac(It is a Java Compiler)
3. Java(It is a java interpreter)
4. Javap(Java diassembler,which convert byte code into program description)
5. Javah(It is for java C header files)
6. Javadoc(It is for creating HTML document)
7. Jdb(It is Java debugger)

compiling and running commands:-

a) javac (Java compiler)
In java, we can use any text editor for writing program and then save that program with .java extension. Java compiler convert the source code or program in bytecode and interpreter convert  .java file in .class file.
Syntax:
C:\javac filename.java
                   If my filename is ―abc.java  then the syntax will be
C:\javac abc.java

b) java(Java Interpreter)
As we learn that, we can use any text editor for writing program and then save that program with .java extension. Java compiler convert the source code or program in bytecode and interpreter convert  .java file in  .class file.
Syntax:
C:\java filename
If my filename is abc.java then the syntax will be
C:\java abc

Java Virtual machine(JVM)

All programming language compilers convert the source code to machine code.Same job done by Java Compiler to run a Java program, but the difference is that Java compiler convert the source code into Intermediate code is called as bytecode. This machine is called the Java Virtual machine and it exits only inside the computer memory.
Following figure shows the process of compilation.



Why is Java called platform independent

Java does not compile a program directly to machine code, it translates a program to an intermediate code named bytecode, which is later interpreted by JVM to respective machine codes. Thus, a single program can be run on any platform. This is why Java is called platform independent.

Thursday, August 30, 2012

What is Java

Java is a programming language created by James Gosling from Sun Microsystems in 1991. The first publicly available version of Java (Java 1.0) was released in 1995. Over time new enhanced versions of Java have been released. The current version of Java is Java 1.7 which is also known as Java 7.
Java is a simple and yet powerful object oriented programming language and it is in many respects similar to C++. It was developed to provide a platform-independent programming language.

Twitter Delicious Facebook Digg Stumbleupon Favorites More