Introduction
- Genesis of Java
- Java and the World Wide Web
- The beauty of Java: The “Byte code”
- Java Framework Configuration
- Java Features
- Summary
Before Java, the internet was used primarily for sharing information. Though, developers soon realized that the World Wide Web could fulfill the needs of business potentials, in 1990. The WWW is a technology that treats internet resources as linked stuff and it has revolutionized the way people access information. The web enables internet users to access internet services, without learning sophisticated cryptic commands. Using webs, corporations can easily provide product information and sell merchandise using the computer. Java technology takes this a step further by making it possible to serve fully interactive applications, via the web.
In particular, Java programs can be embedded into web documents. Turning a static page into an application that runs on the user's computer. Java has the potential to change the function of the internet, just as the web has changed the way people access the internet. In other words, not only will the network provide information, it will also serve as an operating system.
In 1990, Java was conceived by James Gosling, Patrick Naughton, and Ed Frank at Sun Microsystem. This language was initially known as Oak. Oak preserved the familiar syntax of C++, but omitted the potentially dangerous features like pointer arithmetic, operator overloading, and explicit resource references. Oak incorporated memory management directly into the language, freeing the programmer to concentrate on the task to be done, by the program. As Oak matured, the WWW was growing dramatically and the component team at Sun realized Oak was perfectly suited for internet programming. Thus, in 1994, they completed work on the product known as WebRunner, an early browser written in Oak. WebRunner was later renamed HotJava and it showed the power of Oak as an internet development tool. Finally, in 1995, Oak was renamed Java and introduced on Sun. Since then, Java's rise in popularity has been dramatic.
Java is related to C++, that is a direct descendant of C. Much of the character of Java is inherited from C++. From C++, Java derives its semantics. Java is truly an Object-Oriented Programming, case sensitive language. Many of Java OOP features were influenced by C++. The original impetus for Java was not the internet. Instead, the primary motivation was the need for a platform-independent language, that could be used to create software to be embedded in various consumer electronic devices. The trouble with C and C++ is that they are designed to be compiled for a specific target. So, an easier and more cost-efficient solution was Java technology, a truly open source technology.
Today, the web acts as a convenient transport mechanism for Java programs. The Web's ubiquity, has popularized Java as an internet development tool. Java expands the universe of objects, that can move about freely in cyberspace. In a network, two very broad categories of objects are transmitted between the server and your personal computer. They are passive information and dynamic active programs. For example, when you read your e-mails, you are viewing passive data. However, the second type of object can be transmitted to your compute, a dynamic, self-executing program. For example, a program might be provided by the server to display the data properly, that the server is sending. Dynamic network programs present serious problems in the area of security and portability. As you will see, Java addresses those concerns effectively, by introducing a new form of program, the applet.
Java primarily stipulates two types of programs, applets and applications. An applet is an application designed to be transmitted over the internet and executed by a Java-compatible web browser. An applet is a tiny Java program that is dynamically downloaded across the network. An applet is a type of program that can react to user input and dynamically change. On the other hand, an application runs on your computer, under the operating system of that computer such as, one application created in the C or C++ language.
Java technology provides portable code execution across diverse platforms. Many types of computers and operating systems are in use throughout the world and many are connected to the internet. For programs to be dynamically downloaded to the various types of platforms connected to the internet, some means of generating portable executing code is needed.
The Java compiler does not produce executable code to resolve security and portability issues. Rather, it is bytecode. The bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system. It is referred to as the Java Virtual Machine (JVM). The JVM essentially is an interpreter for bytecode. Translating a Java program into bytecode helps make it easier to run a program in a wide variety of platforms such as Linux, Windows, and Mac. The only requirement is the JVM needs to be implemented for each platform. Once the runtime package exists for a given system, any Java program can execute on it. Although, the details of the JVM will differ from platform to platform, all interpret the same Java bytecode. Thus, the interpretation of bytecode is a feasible solution to create a truly portable program.
In fact, most modern technologies such as C++ and C# are designed to be compiled, not interpreted. Mostly because of performance concerns. When a program is interpreted, it generally runs substantially slower than it would, if compiled to executable code. The use of bytecode enables the Java run-time system to execute programs, much faster than you might expect.
To execute Java bytecode, the JVM uses a class loader to fetch the bytecodes from a network or disk. Each class file is fed to a bytecode verifier that ensures the class is formatted correctly and will not corrupt memory when it is executed. The JIT compiler converts the bytecodes to native code instructions on the user's machine, immediately before execution. The JIT compiler runs on the user machine and is transparent to the users. The resulting native code instructions do not need to be ported, because they are already at their destination. The following figure illustrates how the JIT compiler works.
To write and execute a program written in the Java language, we are supposed to configure our workstation with the following software:
Genesis of Java
Java and the World Wide Web
The beauty of Java: The “Byte Code”


Prerequisite
- Java Development Kit (JDK)
- Java Virtual Machine (JVM)
- Eclipse Juno IDE
- Tomcat Web Server (Required for Servlet and JSP)
- Notepad++ (optional)
Java Framework Configurations
Java Development Kit


First Hello World Java Program
- public class HelloWorld {
- public static void main(String[] args) {
- System.out.println("Hello Word!");
- }
- }




Join the conversation! Your thoughts help the community grow.