Chapter 1. Getting Started: Compiling, Running, and Debugging

Introduction

This chapter covers some entry-level tasks that you simply need to know how to do before you can go on -- it is said you must crawl before you can walk, and walk before you can ride a bicycle. Before you can try out anything else in the book, you need to be able to compile and run your Java, so I start there, showing several ways: the JDK way, the Mac way, and the Integrated Development Environment (IDE) way. Then I’ll discuss a few details about applets, in case you are working on them. Deprecation warnings come next, as you’re likely to meet them in maintaining “old” Java code. [5]

If you’re already happy with your IDE, you may wish to skip some or all of this material. It’s here to ensure that everybody can compile and debug their programs before we move on.



[5] There is humor in the phrase “old Java code,” which should be apparent when you realize that Java has been in circulation for under five years at the time of this book’s first printing.

Get Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.