From LQWiki
Java technology is both a programming language and a platform. One of the major reasons for its popularity is that it is "cross-platform" - a correctly-written piece of Java software will run on any computer that has a Java Virtual Machine installed. Specialised Virtual Machines even exist for mobile phones and PDAs.
The technical standards for Java are administered by Sun Microsystems. Unfortunately Sun's own JVM is not fully Open Source, only a part of the source code has been released under GPL version 2 the 13 November 2006 (http://www.sun.com/2006-1113/feature/index.jsp), and so many Linux distributions do not include it. As a result you may have to download and install a JVM separately before you can use Java software.
Open source software can be written using Java, but in most cases running it relies on non-open software. Of course, there are free software solutions available: for example, you can compile your java code right down to machine code (obviating the need for any JVM whatsoever) with the GCJ front-end to GCC. GCJ -- now with the help of Classpath -- comes with much of the standard core Java packages implemented. Kaffe may also be an option for you.
Contents |
The Java Programming Language
The Java programming language is a high-level, multi-threaded, object oriented, usually interpreted language.
The Java Platform
The typical Java platform has two components; the Java Virtual Machine (Java VM or JVM) which runs Java programs, and the Java Application Programming Interface (Java API) describing the classes and operations available to Java programmers. The JVM isn't needed if you compile your java code with GCJ (though, currently, GCJ doesn't provide all the packages to completely cover all the Java API's).
History
Java was created by James Gosling in 1994.
It was developed as a part of the "Green project" at Sun. It was started by Patrick Naughton, Mike Sheridan and James Gosling with the aim to trying to figure out what the "next wave" of computing would be and how they might catch it.
It was originally designed with embedded devices in mind, but instead became popular because of the internet explosion. (Java applets can run in web browsers.) This may have been a factor in Microsoft's launch of Internet Explorer, since applets and Java-based applications have to potential to render operating systems a commodity. Microsoft also used embrace, extend, and extinguish tactics against Java.
The original name was Oak and the Comic-Logo of Java is called "Duke".
Language Features
Java's main advantages are that it is extremely portable and that it is easily incorporated into web pages in the form of applets. Other features include automatic garbage collection and optional security - one does not need to give a Java program full access to one's computer.
If you are making changes to an existing Java program, the class file structure allows source compatibility and binary compatibility to be essentially the same thing. Significant additions can be made to large programs with recompilation required for only the altered parts. In general, Java allows for easier program alteration than native code compiled languages.
Getting Java
Java comes in different flavours and implementations.
These are usually called:
- JRE - Java Runtime Enviroment, a minimal package for only running Java programs.
- JDK - Java Development Kit, a package for developing and running Java applications. (As of Java 1.2, it's now referred to as an "SDK" -- Java 2 Software Development Kit.) The SDK includes a JRE along with it, so you don't need to install both the SDK and the JRE. The Java 2 SDK comes in three different flavours, targeted for development for specific applications:
These packages include a JVM, some tools (like a compiler, jar compressors, etc.), and a library of classes. But there are also some separate JVM implementations, tools and libraries. There are also different versions of Java, from the original 1.1 to the latest 1.4 (and 1.5 is in beta stage).
The JRE and JDK are avaliable either as an rpm or self-installing script. Unusually, Sun distributes the rpm file in a compressed, self extracting script. This is an even more unusual method of distribution when it is considered rpms are already compressed, and Sun's 'compressed' script makes the download slightly larger.
Sun's virtual machine packages are only avalibale on Linux for the i386 family (inc 64bit variants) and sparc (the CPU used in Sun's own computers). Unfortunately users of other CPUs such as PPC cannot use Sun Java.
Full batteries included packages
SUN
SUN offers a JRE and different JDKs flavours. All these can be downloaded at the SUN java website[1], the JRE download page is here, the SDKs can be found here. And since SUN develops the official Java standard, they have them for all Java versions.
See Sun Java
Blackdown
Blackdown offers modified versions of the SUN packages for Linux. They also ported them to other platforms for Linux. They also offer debian packages. They are named simliar to the SUN ones, and can be downloaded from one of their mirrors. See their website for download mirrors and current status to see which versions are available.
IBM
IBM offers an own implementation for the JVM, they created JRE and JDK packages for linux up to and including Java version 1.4. These can be found on the IBM website here.
Standalone JVM implementations
These don't come with the class library, so it needs to be acquired somewhere else. Most of standalone JVM's are able to use the classes that come with a JRE/JDK from SUN or the implementation from GNU's Classpath.
There are many of these around, the most well known are:
Standalone Java compilers
- Jikes [5]
- GCJ - Part of the GNU Compiler Collection, GCJ is special in that it can compile Java code (and also Java bytecode for that matter) right down to native machine code.
Alternative library implementations
Integrated Development Enviroments
- Eclipse -- open source IDE platform, developed by the Eclipse Foundation
- NetBeans -- IDE originally developed by SUN, now open source.
Java-oriented editors
- jEdit -- a nice GPL'd text editor written in Java and most useful for editing Java code.
See also (tips & install)
- Java tips
- Compiled languages section
- Unified Modeling Language
- Java-GNOME -- Java bindings for GNOME.
- Jython
- Java Installation in Debian
- Java-Debian -- installation tips
External links
- Official Java website (java.sun.com)
- Object orientation in Java (java.sun.com)
- Visual Paradigm for UML(Community Edition) (www.visual-paradigm.com)
- Free UML CASE Tool
- SDE for Eclipse(Community Edition) (www.visual-paradigm.com)
- Free UML plugin for Eclipse
- Java Game Development (javagamedevelopment.net)
- Daily News & Tutorials on Java Game Development
Further Reading
- Java How to Program, by Dietel et al (my source only supports the first two versions.)

This page is available under a