Chapter 1. The Basics


1. The Basics

This chapter contains the phrases that you will need to get you started in Java development. These are things that you need to know before you can accomplish much of anything in Java. The basics include compiling and running your Java code, and understanding the Java class path. Unlike languages such as PHP and Basic, Java source code must be compiled into what is called byte code before it can be executed. The compiler places the byte code into Java class files. Therefore, it is important for anyone programming in Java to understand how to compile their source code into class files, and then be able to execute those class files. Knowledge of the Java class path is important for both compiling and executing Java code. Therefore it is with these phrases that we start.

Today it is common to do Java development within an integrated development environment (IDE), such as the freely available Eclipse projectsee http://www.eclipse.org. This chapter assumes that you are performing the tasks at the command line. Although realistically, you might use an IDE for most of your development, every developer should be familiar with setting up and accomplishing these tasks outside the IDE. Performing these tasks within the IDE will vary with the IDE, and references for your particular IDE are the best place to go for that help.

To execute the phrases contained in this chapter, you should obtain a Java distribution from Sun. Sun makes Java technology available in several popular forms. The most common Java distributions are the Java Standard Edition (SE), the Java Enterprise Edition (EE), and the Java Micro Edition (ME). To complete all phrases in this book, you will only need the Java SE package. Java EE contains additional features for developing enterprise applications, and the Java ME is geared towards developing applications for devices such as cell phones and PDAs. All of these packages can be downloaded from the Sun Java website at http://java.sun.com. The J2SE 5.0 is the most recent version of the Java SE at the time of this writing. Unless you have a reason to use a previous version, this is the version you should use with this book. Within the J2SE 5.0, you will find two packages available for download, the JDK and the JRE. The JDK is the Java development kit and is what you will need to develop Java applications. The JRE is the Java runtime edition and will only allow you to run Java applications, but not build your own. So for this book you will need the JDK distribution of the J2SE 5.0 package.

Note

J2SE 5.0 and JDK 5.0 are also often referred to as JDK 1.5. Sun decided to officially change the name of the 1.5 version to 5.0.

For assistance in installing the most recent version of the Java J2SE JDK as of the writing of this book, see http://java.sun.com/j2se/1.5.0/install.html.





JavaT Phrasebook. Essential Code and Commands
Java Phrasebook
ISBN: 0672329077
EAN: 2147483647
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net