Java Is Platform Independent

This section describes how a Java program can be written and compiled on a Linux system first. The compiled code can be then transferred to a Windows system for execution.

Java is platform independent. Programs written in Java can run on any operating system platform through a Java Virtual Machine (JVM) for that platform.

Sun Microsystems officially provides JVM for the following operating system/platforms:

For example, you can write a Java program and compile it on a Linux system:

%cat Hello.java
class Hello {
   public static void main(String[] a) {
      System.out.println("Hello world!"); 	
   }
}

%javac Hello.java

%ls Hello.class

Then transfer the compiled code, Hello.class, to a Windows system and run it there:

C:\herong>dir Hello.class

C:\herong>java Hello
Hello world!

Table of Contents

 About This Book

 1957 - FORTRAN Language Developed by IBM

 1970 - UNIX Operating System Developed by AT&T Bell Labs

 1971 - FTP Protocol Created by Abhay Bhushan

 1972 - C Language Developed by Dennis Ritchie

 1976 - vi Text Editor Developed by Bill Joy

 1977 - Apple II Designed by Steve Jobs and Steve Wozniak

 1977 - The Bourne Shell Developed by Stephen Bourne

 1978 - The C Shell Developed by Bill Joy

 1978 - Bash (Bourne-Again Shell) Developed by Brian Fox

 1979 - The Tcsh (TENEX C Shell) Developed by Ken Greer

 1983 - "Sendmail" Mail Transfer Agent Developed by Eric Allman

 1984 - Macintosh Developed by Apple Inc.

 1984 - X Window System Developed a MIT Team

 1991 - WWW (World Wide Web) Developed by Tim Berners-Lee

 1991 - Gopher Protocol Created by a University of Minnesota Team

1995 - Java Language Developed by Sun Microsystems

 What Is Java Language?

 Java Compilation and Execution Processes

Java Is Platform Independent

 Java Is an Object-Oriented Language

 Java Supports Automatic Garbage Collection

 Java Supports Multi-Threading Programming

 1995 - PHP: Hypertext Preprocessor Created by Rasmus Lerdorf

 2002 - .NET Framework Developed by Microsoft

 References

 PDF Printing Version