Development Environments

   

Core Java™ 2: Volume I - Fundamentals
By Cay S. Horstmann, Gary Cornell
Table of Contents
Chapter 2.  The Java Programming Environment


If your programming experience comes from Visual Basic or Visual C++, you are accustomed to a development environment with a built-in text editor and menus to compile and launch a program along with an integrated debugger. The basic Java SDK contains nothing even remotely similar. Everything is done by typing in commands in a shell window. We tell you how to install and use the basic Java SDK, because we have found that the full-fledged development environments don't necessarily make it easy to learn Java they can be complex and they hide some of the interesting and important details from the programmer.

Integrated development environments tend to be more cumbersome to use for a simple program since they are slower, require more powerful computers, and often require a somewhat tedious project setup for each program you write. These environments have the edge if you write larger Java programs consisting of many source files. And these environments also supply debuggers, which are certainly necessary for serious development the command-line debugger that comes for free with the Java SDK is extremely awkward to use. We will show you how to get started with the Sun ONE Studio Community Edition, a freely available development environment that is itself written in Java. (Before the eager beavers from the Sun marketing department sprung into action, the program was known as Forte.) Of course, if you already have a development environment such as JBuilder, CodeWarrior or Café that supports the current version of Java, then you can certainly use it with this book.

For simple programs, a good middle ground between command-line tools and an integrated development environment is an editor that integrates with the Java SDK. On Linux, our preferred choice is Emacs. On Windows, we also like TextPad, an excellent shareware programming editor for Windows with good Java integration. Finally, JEdit is an excellent cross-platform alternative. Using a text editor with Java SDK integration can make developing Java programs easy and fast. We used that approach for developing and testing most of the programs in this book. Since you can compile and execute source code from within the editor, it can become your de facto development environment as you work through this book.

In sum, you have three choices for a development environment:

  • Use the Java SDK and your favorite text editor. Compile and launch programs in a command shell.

  • Use the Java SDK and a text editor that is integrated with the Java SDK. Emacs, TextPad, and JEdit have this capability, and there are many others. Compile and launch programs inside the editor.

  • Use an integrated development environment such as the free Sun ONE Studio Community Edition, or one of many other freely or commercially available development environments.


       
    Top
     



    Core Java 2(c) Volume I - Fundamentals
    Building on Your AIX Investment: Moving Forward with IBM eServer pSeries in an On Demand World (MaxFacts Guidebook series)
    ISBN: 193164408X
    EAN: 2147483647
    Year: 2003
    Pages: 110
    Authors: Jim Hoskins

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