Before You Begin

Please follow the instructions in this section to ensure that Java is installed properly on your computer before you begin using this book.

Font and Naming Conventions

We use fonts to distinguish between on-screen components (such as menu names and menu items) and Java code or commands. Our convention is to emphasize on-screen components in a sans-serif bold Helvetica font (for example, File menu) and to emphasize Java code and commands in a sans-serif Lucida font (for example, System.out.println()).

Java Standard Edition Development Kit (JDK) 6

Before you can run the applications in Java for Programmers or build your own applications, you must install the Java Standard Edition Development Kit (JDK) 6 or a Java development tool that supports Java SE 6. The system requirements for the Windows, Linux or Solaris platforms are located at java.sun.com/javase/6/webnotes/install/system-configurations.html.

You can download the latest version of JDK 6 and its documentation from

java.sun.com/javase/6/download.jsp

Click the » DOWNLOAD button for JDK 6. You must accept the license agreement before downloading. Once you accept the license agreement, click the link for your platform’s installer. Save the installer on your hard disk and keep track of where you save it. Before installing, carefully read the JDK installation instructions for your platform, which are located at java.sun.com/javase/6/webnotes/install/index.html. If you are installing Java on Windows, please be sure to follow the instructions for setting the PATH environment variable. Visit developer.apple.com/java/ for information on using Java with Mac OS X.

Downloading the Code Examples

The examples for Java for Programmers are available for download at

www.deitel.com/books/javafp/

If you are not registered at our website, go to www.deitel.com and click the Register link below our logo in the upper-left corner of the page. Fill in your information. There is no charge to register, and we will not share your information with anyone. We send you only account-management e-mails unless you register separately for our free e-mail newsletter at www.deitel.com/newsletter/subscribe.html. After registering, you’ll receive a confirmation e-mail with your verification code. You need this code to sign in at www.deitel.com for the first time.

Next, go to www.deitel.com and sign in using the Login link below our logo in the upper-left corner of the page. Go to www.deitel.com/books/javafp/. Click the Examples link to download the Examples.zip file to your computer. Write down the location where you choose to save the file on your computer.

We assume the examples are located at C:Examples on a computer running Microsoft Windows; however, the examples should work on any platform that supports Java SE 6. Extract the contents of Examples.zip using a tool such as WinZip (www.winzip.com).

Setting the CLASSPATH Environment Variable

If you attempt to run a Java program then receive a message like

Exception in thread "main" java.lang.NoClassDefFoundError: YourClass

then your system has a CLASSPATH environment variable that must be modified. To fix this error, modify the CLASSPATH environment variable to include

.;

at the beginning of its value (with no spaces before or after these characters).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset