Great Things about Java
Java is an operating system independent platform for software development. It consists of a programming language, utility programs and a run time environment. A Java program can be developed on one computer and run on any other computer with the correct run time environment. In general, older Java programs can run on newer run time environments. Java is rich enough that even very complicated applications can be written without operating system dependencies. This is called 100% java.
With the development of the Internet, Java has gained in popularity because when you program for the Web, you have no way of knowing which system the user may be on. With the Java programming language, you can take advantage of the "write once, run anywhere" paradigm. This means that when you compile your Java program, you don't generate instructions for one specific platform. Instead, you generate Java byte code, that is, instructions for the Java Virtual Machine (Java VM). For the users, it doesn’t matter what platform they use--Windows, Linux/Unix, MacOS, or an Internet browser—as long as it has the Java VM, it understands those byte codes.
Three Types of Java Programs
- An “applet” is a Java program designed to be embedded on a web page.
- A “servlet” is a Java program designed to be run on a server.
In these two cases the Java program cannot be run without the services of either a Web browser for an applet or a Web server for a servlet.
- A "Java application" is a Java program that can be run by itself.
The following instructions are for you to program a Java application on a computer that runs Linux.
Very simple, you need only two items to write a Java program:
(1) The Java 2 Platform, Standard Edition (J2SE), formerly known as the Java Development Kit (JDK).
Download the Linux version. Make sure you download the JDK, not the JRE (the JRE is included in the JDK/J2SE).
(2) A text editor
Almost any editor you find on Linux will do (e.g., Vi, Emacs, Pico). We’ll use Pico as an example.