Java Reference
In-Depth Information
Because your Java program consists of bytecodes rather than native machine instructions, it is completely
insulated from the particular hardware on which it is run. Any computer that has the Java environment im-
plemented handles your program as well as any other, and because the Java interpreter sits between your
program and the physical machine, it can prevent unauthorized actions in the program from being executed.
In the past, there has been a penalty for all this flexibility and protection in the speed of execution of your
Java programs. An interpreted Java program would typically run at only one-tenth of the speed of an equi-
valent program using native machine instructions. With present Java machine implementations, much of the
performance penalty has been eliminated, and in programs that are not computation intensive — you really
wouldn't notice this anyway. With the JVM that is supplied with the current Java 2 Development Kit (JDK)
available from the Oracle website, there are very few circumstances where you notice any appreciable de-
gradation in performance compared to a program compiled to native machine code.
Java Program Development
For this topic you need the Java 2 Platform, Standard Edition (J2SE) version 7 or later. The JDK is available
from www.oracle.com/technetwork/java/javase/downloads/index.html . You can choose from versions of the
JDK for Solaris, Linux, and Microsoft Windows, and there are versions supporting either 32-bit or 64-bit
operating system environments.
Using a Program Code Editor
To create the Java program source files that you use with the JDK, you need some kind of code editor. There
are several excellent professional Java program development tools available that provide friendly environ-
ments for creating and editing your Java source code and compiling and debugging your programs. These
are powerful tools for the experienced programmer that improve productivity and provide extensive debug-
ging capabilities. However, for learning Java using this topic, I recommend that you resist the temptation to
use any of these for the time being.
So why am I suggesting that you are better off not using a tool that makes programming easier and faster?
There are several reasons. Firstly, the professional development systems tend to hide a lot of things you need
to get to a grip on if you are to get a full understanding of how Java works. Secondly, the professional de-
velopment environments are geared to managing complex applications with a large amount of code, which
introduces complexity that you really are better off without while you are learning. Virtually all commercial
Java development systems provide prebuilt facilities of their own to speed development. Although this is
helpful for production program development, it really does get in the way when you are trying to learn Java.
A further consideration is that productivity features supported by a commercial Java development are some-
times tied to a specific version of the Java 2 Platform. This means that some features of the latest version
of Java might not work. The professional Java development tools that provide an Interactive Development
Environment (IDE) are intended primarily for knowledgeable and experienced programmers, so start with
one when you get to the end of the topic.
So what am I recommending? Stick to using JDK 7 from Oracle with a simple program text editor or de-
velopment environment for creating and managing your source code. Quite a number of shareware and free-
ware code editors around are suitable, some of which are specific to Java, and you should have no trouble
locating one. I can make two specific suggestions.
• I find that the JCreator editor from www.jcreator.com is particularly good and is easy to install.
There's a free version, JCreator LE, and a paid version with more functionality. The free version
Search WWH ::




Custom Search