| ## Java 1.1 Unleashed # - 2 - Tools for Getting Started by Michael Morrison IN THIS CHAPTER The Java Development Kit 1.1 Selecting an IDE Symantec Café SunSoft Java WorkShop Microsoft Visual J++ Asymetrix SuperCede Roaster Technologies' Roaster SourceCraft NetCraft Pro-C WinGEN for Java Rogue Wave JFactory Metrowerks CodeWarrior When the Java programming language was introduced in 1995, the only development tool available was the Java Development Kit (JDK) from Sun. This set of command-line tools makes it possible to write, compile, and debug Java programs (among other things). However, the JDK is a far cry from integrated development environments such as Visual Basic and Borland C++. An integrated development environment (IDE) is software that combines several development tools into a single, cohesive package. The assortment usually includes a source code editor, compiler, debugger, and other utilities. These tools work together through the development process; most packages are highly visual and rely on windows, drag-and-drop, and other graphical elements. The goal is to make software design faster, more efficient, and easier to debug. Many IDEs make use of rapid application development (RAD) methods. RAD is a broad strategy to use tools such as an interface designer and prototyping to speed up the design process. For most of the Java programming environments that have been released, the RAD tools in evidence are graphical user interface builders. Some of these have a direct connection from the interface design tool to the source code so that you can design a component such as a button and go directly to the event-handling code to make something happen when the button is clicked. This chapter focuses on both the standard JDK 1.1 development tools and on some of the more popular third-party Java IDEs. The goal is to get you up to speed with the types of tools available so that you can begin assembling your own Java toolkit. The following development environments are described in this chapter: The Java Development Kit 1.1 Symantec Café SunSoft Java WorkShop Microsoft Visual J++ Asymetrix SuperCede Roaster Technologies' Roaster SourceCraft NetCraft Pro-C WinGEN for Java Rogue Wave JFactory Metrowerks Code Warrior ## The Java Development Kit 1.1 Before you get started learning about the Java Development Kit, it's important to make sure that you have the latest version. As of this writing, the latest version of the JDK is release 1.1. JavaSoft is expected to release a version 1.1.1 with minor bug fixes in the very near future; you can check Sun's Java Web site at `http://www.javasoft.com/` to see what the latest version is. This Web site provides all the latest news and information regarding Java, including the latest release of the JDK. Keep in mind that Java is still a new technology in a state of rapid change; be sure to keep an eye on this Java Web site for the latest information. The Java Development Kit contains a variety of tools and Java development information. Following is a list of the main components of the JDK: Runtime interpreter Compiler Applet viewer Debugger Class file disassembler Header and stub file generator Documentation generator Archiver Digital signer Remote Method Invocation tools Sample demos and source code API source code The runtime interpreter is the core runtime module for the Java system. The compiler, applet viewer, debugger, class file disassembler, header and stub file generator, and documentation generator are the primary tools used by Java developers. The demos are interesting examples of Java applets, which all come with complete source code. And finally, if you are interested in looking under the hood of Java, the complete source code for the Java API (Application Programming Interface) classes is provided. ### The Runtime Interpreter The Java runtime interpreter (`java`) is used to run standalone Java executable programs in compiled, bytecode format. The runtime interpreter acts as a command-line tool for running Java programs that are either nongraphical or that manage their own window frame (applications); graphical programs requiring the display support of a Web browser (applets) are executed entirely within a browser. The syntax for using the runtime interpreter follows:
    java Options ClassName Arguments
The ClassName argument specifies the name of the class you want to execute. If the class resides in a package, you must fully qualify the name. You learn about classes and packages in Chap- ter 5, "Classes, Packages, and Interfaces." For example, if you want to run a class called `Roids` that is located in a package called `ActionGames`, you execute it in the interpreter like this: `java ActionGames.Roids``` When the Java interpreter executes a class, what it is really doing is executing the `main()` method of the class. The interpreter exits when the `main()` method and any threads created by it are finished executing. Don't worry if you aren't yet familiar with the `main()` method or Java threads--they aren't critical to understanding the runtime interpreter at this point. You'll learn about them soon enough in the coming chapters. The `main()` method accepts a list of arguments that can be used to control the program. The Arguments argument to the interpreter specifies the arguments passed into the `main()` method. For example, if you have a Java class called `TextFilter` that performs some kind of filtering on a text file, you would likely pass the name of the file as an argument, like this: `java TextFilter SomeFile.txt``` The Options argument specifies options related to how the runtime interpreter executes the Java program. Please refer to the JDK documentation for more information about the options supported in the runtime interpreter. ### The Compiler The Java compiler (`javac`) is used to compile Java source code files into executable Java bytecode classes. In Java, source code files have the extension `.java`. The Java compiler takes files with this extension and generates executable class files with the `.class` extension. The compiler creates one class file for each class defined in a source file. This means that it is possible for a single Java source code file to compile into multiple executable class files. When this happens, it means that the source file contains multiple class definitions. NOTE: Even though Java source files and classes are typically given the extensions `.java` and `.class`, it is important to note that some operating systems aren't capable of fully representing these extensions because of their length. For example, Windows 3.1 is limited to three-character extensions, so Java source files and classes must use the extensions `.jav` and `.cla`. The Java compiler is a command-line utility that works in a manner similar to the Java runtime interpreter. The syntax for the Java compiler follows: `javac Options Filename` The Filename argument specifies the name of the source code file you want to compile. The Options argument specifies options related to how the compiler creates the executable Java classes. Please refer to the JDK documentation for more information about the options supported by the compiler. ### The Applet Viewer The applet viewer is a tool that serves as a minimal test bed for final release Java applets. You can use the applet viewer to test your programs instead of using a full-blown Web browser. You invoke the applet viewer from a command line like this: `appletviewer Options URL` The URL argument specifies a document URL containing an HTML page with an embedded Java applet. The Options argument specifies how to run the Java applet. There is only one option supported by the applet viewer: `-debug`. The `-debug` option starts the applet viewer in the Java debugger, which enables you to debug the applet. To see the applet viewer in action, check out Figure 2.1. Figure 2.1. The `MoleculeViewer` applet running in the Java applet viewer. Figure 2.1 shows the `MoleculeViewer` demo applet (which comes with the JDK) running in the applet viewer. This program was launched in the applet viewer by changing to the directory containing the `MoleculeViewer` HTML file and executing the following statement at the command prompt: `appletviewer example1.html``` example1.html is the HTML file containing the embedded Java applet. As you can see, there's nothing complicated about running Java applets using the applet viewer. The applet viewer is a useful tool for testing Java applets in a simple environment. ### The Debugger The Java debugger (`jdb`) is a command-line utility that enables you to debug Java applications. The Java debugger uses the Java Debugger API to provide debugging support within the Java runtime interpreter. The syntax for using the Java debugger follows: `jdb Options` The Options argument is used to specify different settings within a debugging session. For more information about the options supported in the debugger, see Chapter 28, "Java Debugging." ### The Class File Disassembler The Java class file disassembler (`javap`) is used to disassemble executable Java class files. Its default output consists of the public data and methods for a class. The class file disassembler is useful in cases where you don't have the source code for a class, but you want to know a little more about how it is implemented. The syntax for the disassembler follows: `javap Options ClassNames` The ClassNames argument specifies the names of one or more classes to be disassembled. The Options argument specifies how the classes are to be disassembled. Refer to the JDK documentation for more information about the options supported in the class file disassembler. ### The Header and Stub File Generator The Java header and stub file generator (`javah`) is used to generate C header and source files for implementing Java methods in C. The files generated can be used to access member variables of an object from C code. The header and stub file generator accomplishes this by generating a C structure whose layout matches that of the corresponding Java class. The syntax for using the header and stub file generator follows: `javah Options ClassName` The ClassName argument is the name of the class from which to generate C source files. The Options argument specifies how the source files are to be generated. Refer to the JDK documentation for more information about the options supported in the header and stub file generator. ### The Documentation Generator The Java documentation generator (`javadoc`) is a useful tool for generating API documentation directly from Java source code. The documentation generator parses through Java source files and generates HTML pages based on the declarations and comments. The syntax for using the documentation generator follows: `javadoc Options FileName` The FileName argument specifies either a package or a Java source code file. In the case of a package, the documentation generator creates documentation for all the classes contained in the package. The Options argument enables you to change the default behavior of `javadoc`. Because the Java documentation generator is covered in detail in Chapter 29, "Documenting Your Code," you'll have to settle for this brief introduction for now. Or you could jump ahead to Chapter 29 to learn more now. ### The Archiver The Java archiver (`jar`) is a tool used to combine and compress multiple files (usually applets or applications) into a single archive file, which is also commonly referred to as a JAR file. Combining the components of an applet or application into a single archive allows them to be downloaded by a browser in a single HTTP transaction instead of requiring a new connection for each individual file. This approach, coupled with the data compression provided by the archiver, dramatically improves download times. Additionally, the archiver can be used with the digital signer (described in the following section) to sign applets and applications so that they can be authenticated at runtime. The syntax for using the archiver follows:
    jar Options ManifestFileName OuputFileName InputFileNames
The ManifestFileName argument specifies a manifest file used to describe the contents of the archive being created. The OutputFileName argument specifies the name of the archive to be created. The InputFileNames argument specifies the files to be added to the archive. The Options argument enables you to change the default behavior of `jar`. You learn all about manifest files, code signing, and the ins and outs of the `jar` tool in Part VIII of this book, "Java Archives and JavaBeans." ### The Digital Signer The Java digital signer (`javakey`), also known as the Java security tool, is an interesting tool that generates digital signatures for archive files. Signatures are used to verify that a file came from a specified entity, or signer. To generate a signature for a particular file, the signer must first be associated with a public/private key pair and must also have one or more certificates authenticating the signer's public key. The digital signer is responsible for managing this database of entities, along with their keys and certificates. The syntax for using the digital signer follows:
    javakey Options
The Options argument is used to control the operation of `javakey`. You learn all about digital code signing, public and private keys, and the specifics of how to use the `javakey` tool in Chapter 37, "Code Signing and JAR Security." ### The Remote Method Invocation Tools The JDK includes three different tools for working with and managing remote method invocation (RMI). These tools consist of an RMI stub compiler, a remote object registry tool, and a serial version tool. For more information about the RMI tools, please refer to Chapter 17, "The RMI Package." ### Examples and Source Code The JDK comes with a variety of interesting Java examples, all of which include complete source code. Following is a list of the Java example applets that come with the JDK: `Animator` `ArcTest` `BarChart` `Blink` `BouncingHeads` `CardTest` `DitherTest` `DrawTest` `Fractal` `GraphicsTest` `GraphLayout` `ImageMap` `ImageTest` `JumpingBox` `MoleculeViewer` `NervousText` `ScrollingImages` `SimpleGraph` `SpreadSheet` `TicTacToe` `TumblingDuke` `UnderConstruction` `WireFrame` Rather than go through the tedium of describing each of these examples, I'll leave most of them for you to explore and try out on your own. However, it's worth checking out a few of them here and discuss how they impact the Web. The first demo applet we're concerned about is the `BarChart` applet, shown in Figure 2.2. Figure 2.2. The `BarChart` Java applet. The `BarChart` applet is a good example of how Java can be used to show statistical information on the Web graphically. The data represented by the bar graph could be linked to a live data source, such as a group of stock quotes. Then you could actually generate a live, to-the-minute, dynamically changing stock portfolio. The `GraphicsTest` applet is a good example of how to use Java graphics. Java includes an extensive set of graphics features, including support for drawing primitive shapes as well as more elaborate drawing routines. Figure 2.3 shows what the `GraphicsTest` applet looks like. Figure 2.3. The `GraphicsTest` Java applet. Keeping the focus on graphics, the `SimpleGraph` applet shows how Java can be used to plot a two-dimensional graph. There are plenty of scientific and educational applications for plotting. Using Java, data presented in a Web page can come to life with graphical plots. `SimpleGraph` is shown in Figure 2.4. Figure 2.4. The `SimpleGraph` Java applet. On the business front, there's nothing like a good spreadsheet. The `SpreadSheet` Java applet shows how to implement a simple spreadsheet in Java. I don't think I even need to say how many applications there are for interactive spreadsheets on the Web. Check out the `SpreadSheet` applet in Figure 2.5. Figure 2.5. The `SpreadSheet` Java applet. Once you've gotten a headache playing with the `SpreadSheet` applet, it's time to blow off a little steam with a game. The applet in Figure 2.6 demonstrates a simple Java version of TicTacToe. This demo opens a new window of opportunity for having fun on the Web. Games are an interesting application for Java, so keep your eyes peeled for new and interesting ways to have fun on the Web with Java games. Figure 2.6. The `TicTacToe` Java applet. The last applet mentioned in this chapter is the `UnderConstruction` applet, which is a neat little applet that can be used to jazz up unfinished Web pages. This applet shows an animation of the Java mascot, Duke, with a jackhammer. Because the applet also has sound, it's a true multimedia experience! Although this applet is strictly for fun, it nevertheless provides a cool alternative to the usual "under construction" messages that are often used in unfinished Web pages. The `UnderConstruction` applet is shown in Figure 2.7. Figure 2.7. The `UnderConstruction` Java applet. Although running these example applets is neat, the real thing to keep in mind is that they all come with complete source code. This means that you can rip them apart and figure out how they work, and then use similar techniques in your own Java programs. The most powerful way to learn is by example, and the sample applets that come with the JDK are great examples of robust Java applets. ### API Source Code The final component of the Java Development Kit is the source code for the Java API. That's right--the JDK comes with the complete source code for all the classes that make up the Java API. Sun isn't concerned with keeping the internals of Java top secret. They followed the lead of the UNIX world and decided to make Java as available and readily understood as possible. Besides, the real value of Java is not the specific code that makes it work, it's the idea behind it. The API source code is automatically installed to your hard drive when you decompress the JDK, but it may remain in compressed form, depending on your particular platform. It is sometimes very useful to be able to look under the hood to see how something works. The API source code comes compressed in a file called `src.zip`, located in the `java` directory created on your hard drive during installation of the JDK. All the classes that make up the Java API are included in this file. ## Selecting an IDE Although the JDK is certainly sufficient for professional Java development, the advanced features of third-party IDEs (integrated development environments) can improve productivity significantly. Even so, IDEs aren't necessarily for everyone. When you evaluate an IDE for any language, you should ask yourself some questions about what you want to have on hand when you're ready to develop a program. Although this approach is true for any language and any environment, you should consider some specific issues related to Java's unique programming features (such as portability). Ask yourself the following questions: How important is graphical interface design to your programs? Do your programs have to be completely portable across platforms? What is your comfort zone with IDE tools? Do you want to program in other languages at the same time? ### GUI Development Tools The popularity of windowing systems is well established; users have begun to shy away from software that does not make use of these features. Although some of us grizzled veterans have an Amish-like love of the old ways--DOS utilities, the command prompt, batch processing, 1970s dance funk--most users today expect their software to have features such as mouse control, point-and-click, and resizable program windows. Because these requirements make graphical user interface design an important element of most Java programming, it is important to select an IDE that is strong in this area. Most Java IDEs are distinguishing themselves from each other by their approach to interface design and the functionality possible from within the interface development tool. Also, software such as Rogue Wave JFactory is primarily an interface builder rather than an entire IDE. Most Java interface builders work in largely the same way--like a painting program. You start with a blank form and a palette of user interface components. These components are usually Abstract Windowing Toolkit (AWT) objects, and the interface builder generates AWT code that can be modified by a programmer who is fluent in dealing with the toolkit. Some IDEs such as SunSoft Java WorkShop introduce a layer between the AWT and the programmer's source code. The goal of a layer such as this is to make it easier to deal with windowing and interface issues. The IDE handles things behind the scenes so that the programmer can concentrate on larger issues. For some programmers, especially those who spent a lot of time learning the intricacies of the AWT, this may not be an attractive feature. Others may be more interested in the power offered by these interface builders or may be ready to leave the complexity of the AWT behind. One of the nicest features of these interface builders is their capability to generate event- handling code at the same time they create a user interface component. Anyone who has used Visual Basic is familiar with this approach: You plunk down a text field where you want it on a dialog box, double-click the text field, and then begin entering the source code to control how it operates. ### Portability of Code One of the features to watch for when choosing an IDE is whether it produces code that is fully compatible with the standard Java class library. Several of the development environments such as Café and Java WorkShop come with their own versions of the JDK instead of using an existing implementation of the JDK. This usually does not matter because one of the goals of any Java IDE is to take advantage of the language's portability across any platform. Many development environments such as SourceCraft NetCraft work entirely within the JDK to create software that does not enhance those features with proprietary extensions. Others environments, such as Microsoft Visual J++, add features that require new classes. Visual J++ provides extensions to the Java language that are specific to the Windows operating system. For an applet or application designed with Visual J++ to be fully portable, it must not make use of these extensions. Because this IDE is relatively new, it remains to be seen whether the advantage of extended features makes up for the significant disadvantage of platform specificity. This issue is being hotly debated within the community of Java developers because many believe that the continued growth of the language depends on its ability to stay cohesive and fully cross platform. An interesting side issue to the portability question is that most Java development environments are not cross platform themselves--even when the IDE is touted as being a Java program. All the major IDEs that have been introduced to date are offered for specific platforms--primarily because of the use of native code. ### IDE Experience One element of IDE use that sometimes gets lost in the shuffle is the skill level required to use them. If the idea of an IDE is to improve your programming, this can't happen if you can't figure out the IDE! An integrated development environment is a complex type of software. It often makes use of a multiple-document interface where you can have several windows open at once and a dizzying array of options. For experienced programmers, this functionality is a great boon. You want to have as much power at your control as possible. However, a new programmer can easily get lost in some of the available IDEs--especially if the programmer is still learning the Java language. When you are busy clearing out space in your brain for a new programming language, you shouldn't have to find room for an IDE at the same time. Several of the IDEs available for Java are more suited for the code warrior--the multilingual veteran who can throw around jargon like OOP, MUMPS, and male-female connector with the greatest of ease. However, a few of the development environments are more suited for the newcomer because their interface is more approachable and less complex. The best example of this kind of interface is Java WorkShop from SunSoft, which uses the familiar Web browser interface. People coming to Java from a limited programming background--such as HTML developers looking to upgrade their skills--may find this kind of IDE more suited to their tastes. There is a trade-off for this ease of use, of course. An environment like Java WorkShop may require more steps to get a task done--either because the functions are not immediately available or because the environment may not offer some of the functionality of a more complex IDE. ### Multiple Language Development Another factor regarding the use of an IDE for some programmers is its use with other languages. Several of these environments, including Metrowerks CodeWarrior and Microsoft Visual J++, are designed to handle more than one language or are fully equivalent to the company's other development tools. If the IDE is a complex one (as these are), you learn how to use it and don't have to learn another when you shift gears and program in a nonJava language. Also, if you write native methods for use in your Java programs, you can use some multilanguage IDEs to write that code. The Visual J++ environment integrates completely with the Visual C++ environment, so native methods can be written alongside Java methods in an integrated manner. ### The Bottom Line The goal of an IDE is to make you a better programmer. As Java developer Chuck McManis wrote in his August 1996 JavaWorld column, "I rate the IDEs by my ability to get productive work done while using them." As you go over the details of the software products discussed in the following sections, you get a clearer picture of how each environment can help you. Given the number of IDEs already available for Java, you should be able to match one with your skill level, programming tasks, and personal taste. If not, as the Amish coder might tell you--there's always the JDK. You can match it with word processors, custom interface builders, and other single-feature design tools to create a personalized IDE. CAUTION: If you are downloading tryout or beta copies of several IDEs--as I did in the course of preparing this material--be advised that these rival products may not coexist peacefully. Many Java development tools make use of environment variables such as `CLASSPATH` and `JAVAHOME`, and they are not happy if another software tool has claimed these variables for its own purposes. As an example, Café and Java WorkShop are the Prince Charles and Lady Diana of software--they should be kept apart for the benefit of everyone involved. If possible, deinstall one IDE before installing the next one on your system and make sure that your boot files are cleaned out as well. If you need more than one IDE active on your system, you can establish multiple configuration files that are executed when a particular environment is used. NOTE: As of this writing, none of the IDEs mentioned here support Java 1.1 because Java 1.1 is so new. There will no doubt be a mad rush by tool vendors to support Java 1.1, so you can expect support for the new Java version by these IDEs in the very near future--if it's not available by the time you read this. ## Symantec Café Symantec Café, originally released in March 1996, is the first development environment that became widely available for Java programming after the JDK. Symantec calls it an integrated development and debugging environment (IDDE), but the added D doesn't make it different from most IDEs--the others usually include a debugger, too. Café is based on Symantec's C++ environment, but Café is a standalone product that does not require a C++ platform to run. ### System Requirements Symantec has released versions of Café for the Microsoft Windows 95, Windows NT 3.5x, and Macintosh systems. For Microsoft users, an Intel 386 processor and 8M of memory are required, but a 486 or better and 16M of memory are recommended. A VGA monitor is needed, but Symantec recommends that an SVGA monitor be used if available. The software and all its sample files and Help files require 60M of disk space and a CD-ROM drive. For Macintosh owners, a Power Macintosh, 68030, or 68040 Macintosh is required, and 16M of memory is recommended. The full installation of the software requires 30M of disk space. Café incorporates the JDK into its release with a full implementation of the Java class libraries and source code samples. You do not have to have the JDK before installing Café. In fact, it is prudent to deinstall the JDK before implementing Café to avoid system conflicts between the two. ### Overview Café is a sophisticated IDE that offers an excellent source editor with color highlighting of syntax, an editor for class and hierarchy modification, a Studio tool for interface design, and numerous example applets. To aid in the design of a class hierarchy, Café has a class editor for navigating through classes and editing class methods, and a hierarchy editor for viewing and modifying Java class relationships. Changes in the source code that affect the class hierarchy can be seen as the program is being written, instead of requiring that it be compiled before changes are reflected in the hierarchy. You can also change the source code from within the class editor--clicking the function or method within a class brings up its source code in a window you can use to edit the code. With AppExpress, the process of creating a skeleton Java program speeds up. This and several other Express Agents--Café's term for wizards--make it easier to begin projects and new programs. In the source editor, Java syntax is highlighted, making it easier to spot typos and other errors immediately. The editor can be customized to behave like several popular programmers' editors such as Brief, Emacs, and Epsilon. The editor also uses the standard Windows cut, copy, and paste commands. With Café Studio, designing a graphical user interface for your Java programs can be done in a visual, drag-and-drop manner. Studio enables programmers to develop the dialog boxes and other visual elements visually, and it creates event handlers for these components automatically. There's also a menu editor with an active window in which you can test the menu. These resources are saved in separate `.rc` files that can be edited later (just as source files are edited); the `.rc` format is compatible with other design tools that generate `.rc` files. One interesting aspect of Café Studio is the ability it gives you to design a form and dictate exactly how it looks. With the JDK and its Abstract Windowing Toolkit, GUI designers have to allow their work to be changed depending on the platform the applet or application is running on. This approach is similar to the way HTML can be modified to fit the large number of platforms used on the World Wide Web. It's an approach well suited to cross-platform design. With Café Studio, programmers can choose to use one of these variable layout managers or to dictate the position and size of all interface elements. When you're ready to compile a program, Café provides the option to use Sun's JDK compiler or the Café compiler, which operates more quickly than the current JDK version. The Café debugger provides several different ways to temporarily halt the execution of code, including a quick-breakpoint feature for a one-time run that stops at a specific line. The debugger also enables a large amount of control over threads in multithreaded programs. During debugging, you can use a watch view to monitor the contents of variables. The environment of Symantec Café is highly customizable--all toolbars and palettes can be resized and placed where you want them on-screen. Several windows can be open at the same time, making it possible to view the object hierarchy while entering source code and using the form editor, for example. ### How to Get It In addition to retail and mail-order outlets, you can purchase Café from Symantec's Web site. The home page for Symantec Café is at the following URL: `http://cafe.symantec.com/` The customer service number for the company is (800) 441-7234, and its e-mail address for Java-related comments and questions is `javainfo@symantec.com`. ## SunSoft Java WorkShop SunSoft Java WorkShop, the development tool offered by the language's home team, is an IDE written almost entirely in Java. Its development has been used to help improve the Java language. The mindset at Sun is that committing to such a large-scale undertaking in the company's own language gives it insight into the issues other developers are facing and reveals any kinks in Java that still have to be straightened out. However, all that talk doesn't benefit the developer looking for a tool to write software. Java WorkShop is evaluated here on the basis of its applicability to this task. ### System Requirements Versions of Java WorkShop are available for the following systems: Microsoft Windows 95, Windows NT 3.5.1, SPARC Solaris (2.4 or later), and Intel x86 Solaris systems. Microsoft Windows 95 and NT systems must be running a 90-megahertz Pentium or better with 16M of memory and 45M of hard disk space. Solaris systems must have 32M of memory, 45M of disk space, and an OSF/Motif 1.2.3-compliant windowing system. The recommended display resolution to use with Java WorkShop is 800x600 pixels. Java WorkShop comes with its own modified version of the JDK, so it cannot be used in conjunction with an existing installation of the kit. Like Café, Java WorkShop requires that any existing JDK copies be deinstalled before you can install and run WorkShop correctly. ### Overview Java WorkShop, one of the most approachable IDEs for a novice programmer, uses a Web interface to offer the following features: a source editor, class browser, debugger, project management system, and Visual Java (a tool for the visual design of a graphical interface and an easier means to create windowing software). The most striking difference between Java WorkShop and other IDEs is its interface. Java WorkShop looks more like a Web browser than a programming development environment. It is a Web browser, in fact--users of Sun's HotJava browser will recognize elements from that software in the design of WorkShop. In addition, you can view any Web page while working in Java WorkShop. Java WorkShop's browser interface is easier to use for programmers who are unfamiliar with IDEs and similar software; the browser interface is frustrating to some of those who are comfortable with these tools. WorkShop has a source browser for viewing a class hierarchy, public methods, and variables. The browser creates HTML pages in the same format as HTML documentation generated by the JDK's `javadoc` utility. The WorkShop source editor works in conjunction with WorkShop's debugger--compilation errors create links directly into the source editor for fixing. The WorkShop debugger provides breakpoints and other methods of debugging. The Visual Java feature provides a way to graphically design an interface, much as Café Studio does. Visual Java enables programmers to develop dialog boxes and other visual elements and automatically creates event handlers for these components. There's also a menu editor. Resources are saved in separate `.gui` files that can be edited later, just as source files are edited. The environment is not customizable in the way Café is, but the Web interface makes it easy to integrate other tools and programs into WorkShop. The program is a collection of Web pages with Java programs embedded in and around them. You can go to a different page from within Java WorkShop as easily as you can enter a URL in a Web browser. This approach makes it possible for a user to create original pages of Java development tools that can be linked to WorkShop pages. This arrangement may be unusual for someone accustomed to development environments written as cohesive, single-executable files that can't be changed (as most are). However, it suits the spirit of Java--independent programs linked together by HTML pages, which can be modified as individual elements without affecting the other parts of the whole. ### How to Get It Java WorkShop can be downloaded freely for evaluation. For more detail and the opportunity to download an evaluation copy, visit the following URL: `http://www.sun.com/sunsoft/Developer-products/java/../index.html` The customer service number to use for the company is (800) 786-7638 (SUN-SOFT) in the United States, or (512) 434-1511 elsewhere. The company's e-mail address for comments and questions is `sunsoft@selectnet.com`. ## Microsoft Visual J++ Microsoft Visual J++ is Microsoft's answer to a Java development environment. Designed to integrate with Microsoft's Visual Studio suite of development tools, Visual J++ features extensions to the Java class library that are specific to the Windows platform. Visual J++ sports the look and feel of the popular Visual C++ development environment, as well as most of its advanced features. Visual J++ provides the only real support of any IDE for fully integrating Java with ActiveX. ### System Requirements Visual J++ is currently available only for the Windows 95/NT platform. It requires a minimum of a 486 or higher processor with 8M of memory for Windows 95 (12M recommended), or 16M of memory for Windows NT Workstation (20M recommended). A typical installation requires 20M of hard disk space, while a minimum installation weighs in at 14M. ### Overview For Windows developers familiar with the Visual C++ IDE, it will be very easy to hit the ground running with Visual J++. Even for developers new to Microsoft's visual development environments, Visual J++ presents a reasonable learning curve. For Java programmers who really want a jumpstart, Visual J++ includes wizards that give step-by-step assistance for building applets. It also sports the fastest Java 1.02 source code compiler, at 10,000 lines of code per second. It isn't clear whether Microsoft will be able to maintain this record with its Java 1.1 compiler--we'll just have to wait and see. The Visual J++ editor is very nice and fully supports color syntax highlighting. There is also a class viewer, which shows all the Java classes that have definitions as well as the members of those classes, including properties and methods. Visual J++ has a very powerful graphical Java debugger that supports the debugging of multiple applets simultaneously from within a browser. The debugger comes complete with bytecode disassembly, bytecode-level stepping and tracing, and the ability to assign values to variables while debugging. All things considered, Visual J++ is one of the better Java IDEs available. There are some valid concerns over Microsoft's proprietary extensions for Java, but Microsoft knows it must adhere to the core Java API to lure developers. As long as the company continues to do that, it can bundle in as many proprietary extensions as it wants. ### How to Get It Visual J++ is currently not available for download. However, you can find out lots more information about it and even purchase a copy online at Microsoft's Visual J++ home page: `http://www.microsoft.com/visualj/` ## Asymetrix SuperCede SuperCede, by Asymetrix, is a forms-based IDE geared toward being an easy-to-use environment for learning and using Java. SuperCede's tight integration between forms and source editors makes it easy to navigate between user interface objects and their associated event handlers. SuperCede also includes a very interesting compiler technology known as flash compilation, which allows developers to modify the source code of a running application and instantly see the impact of the change. The flash compiler in SuperCede also provides developers with the option of generating portable Java bytecode or native Intel machine code for higher performance. ### System Requirements SuperCede is currently available only for the Windows 95/NT platform. It requires a minimum of a 486/66 or higher processor with 32M of memory and 50M of hard disk space. ### Overview The SuperCede integrated development environment includes a project manager, browsers, a color syntax-highlighting source editor, a drag-and-drop form editor, and a graphical debugger, among other things. The browsers included with SuperCede include source, form, and class and content file browsers. The forms-centric development approach used by SuperCede streamlines application development. The one thing that really sets SuperCede apart as a Java development environment is its flash compiler technology, which allows you to interactively modify running applications. Additionally, the flash compiler in SuperCede allows you to choose between generating standard Java bytecode executables or native x86 executables that perform significantly better but specifically target Intel processors. ### How to Get It You can get more information about SuperCede and even download an evaluation copy from Asymetrix's SuperCede home page: `http://www.asymetrix.com/products/supercede/` ## Roaster Technologies' Roaster Roaster Technologies' Roaster was made available to developers in January 1996, making it the first Java IDE for the Macintosh. As of this writing, the current version is Developer release 2.3, which contains significant enhancements over Roaster's debut version. Roaster includes a visual interface builder, a compiler that can be targeted for Macintosh or Microsoft Windows systems, and an extended class library. ### System Requirements The minimum requirements for Roaster are a 68030 or greater processor, Macintosh Sys- tem 7.1.2 or later (7.5 or later preferred), and 8M of RAM. ### Overview In many ways, Roaster is the Java IDE of choice for Macintosh developers, primarily because it was the first IDE for the Mac and has had more time to evolve. Roaster includes a fully integrated browser, class tree viewer, and editor. Roaster also fully supports AppleScript and includes an AppleScript class wizard that guides you through building AppleScript classes. Roaster provides support for running and testing applets over a network, as well as Java classes for accessing databases using ODBC. Roaster is the only Java IDE that gives registered users a free subscription to Java Report magazine, a SIGS publication. ### How to Get It You can find out more about Roaster by dropping by Roaster Technologies' Roaster home page at this URL: `http://www.roaster.com/roaster/` ## SourceCraft NetCraft SourceCraft, the developer of the ObjectCraft development environment, is making its NetCraft Java IDE available as freeware. For those unfamiliar with the term, freeware is software available for no cost as long as you comply with the developer's terms and conditions for use. This fact makes NetCraft attractive if cost is a criteria--obviously!--but the IDE still must be well designed or you will pay in terms of lost time and efficiency. ### System Requirements Versions of NetCraft are available for Microsoft Windows 95 and Windows NT 3.5.1 systems running a 486 or better with 8M of memory. NetCraft comes bundled with the current version of the JDK; SourceCraft also makes NetCraft available for download without the JDK if you already have the JDK installed. ### Overview SourceCraft NetCraft is somewhat less ambitious in its approach than other IDEs because it has a smaller set of available features. However, it is a fully featured replacement for the JDK, and it creates Java programs compatible across all Java implementations. NetCraft has an editor, a class inspector, a user interface designer, and a compiler. NetCraft is an IDE that can be used for any type of Java applet or application. In its approach to the software, SourceCraft focuses on Java's applicability in intranet environments. The Package Inspector, part of NetCraft's system for organizing projects, includes a way to browse the methods used in a class. NetCraft also has a Class Inspector for looking at the following aspects of a class: its position in the hierarchy, its methods, and its variables. When you are looking at a method with this tool, you can view the source code of the method and how it is used in a program. NetCraft, like Café and Java WorkShop, includes a way to visually develop a graphical user interface. The NetCraft UI Builder generates Java code that uses the Abstract Windowing Toolkit as its raw material, so the code does not rely on any new classes introduced with the development environment. When you create an interface component, NetCraft generates source code for that component, complete with a `TODO` comment line where the event-handling code for that component is placed. It's a simpler approach than some of the alternatives; a programmer comfortable with the AWT should be comfortable with it. The source editor uses Windows cut-and-paste commands and is similar to other small word processors with which you are probably familiar. And the NetCraft UI builder is not much more difficult to use than a word processor. A nice feature of the builder is its ability to set the specific coordinates (height and width) of a component by entering numbers into text fields. The environment is simpler to use and master than other IDEs. However, this may be a problem when you are developing sophisticated programs with numerous windows and interactions; some of the tools you need to manage this software are not available in NetCraft. Its strength for use with complex programs depends on where SourceCraft, the maker of other development tools, plans to go with this freeware product. For basic tasks and applets, NetCraft appears to be a good substitute for JDK users seeking to migrate to a graphical interface. Because it is free, it is a fitting place for novices to start when choosing a Java IDE. ### How to Get It For more details, and the opportunity to download NetCraft at no cost, visit the home page for NetCraft at this URL: `http://www.sourcecraft.com:4800/about/netcraft/` The customer service number for the company is (617) 221-5665; the company's e-mail address for comments and questions is `edc@sourcecraft.com`. ## Pro-C WinGEN for Java WinGEN for Java, the development software from Pro-C, is an IDE designed with the nonprogrammer in mind. The focus is on automatically generating code so that HTML designers and other programming novices can develop Java applets and applications. The graphical interface of a program can be developed using drag-and-drop features; elements such as animation can be introduced without writing a single line of code. The IDE calls the Java Development Kit from within WinGEN to compile and run programs. ### System Requirements Versions of WinGEN are available for Microsoft Windows 95 and Windows NT 3.5.1 systems running a 486 or better with 8M of memory and 10M of hard disk space. Unpacking WinGEN Lite, the evaluation edition of the software, requires a program that can unpack ZIP files into long filenames. (For users of Windows systems, the Windows 95 operating system introduced filenames longer than eight characters and a three-character extension.) If you use a ZIP unpack program that does not support long filenames, files are not named correctly and the setup will fail. WinGEN includes the current version of the JDK, which must be installed before WinGEN is installed so that the IDE will function. ### Overview WinGEN augments the existing JDK rather than replacing it, enabling you to run the compiler and interpreter from within WinGEN rather than using the JDK's command-line tools. As software that strives to put nonprogrammers to work developing Java applets and applications, WinGEN puts its emphasis on its point-and-click approach to the creation of graphical user interfaces. Many simple user events can be created through WinGEN without writing any Java code; graphics and animation features can also be created without programming. The user interface is designed in a manner that should be familiar to programmers who have used other GUI design tools--especially Visual Basic developers. The version currently available is a bit difficult to use when it comes to aligning components (because of the lack of a snap-to grid feature). Otherwise, laying out things such as text fields and labels is easier than doing so in some other IDEs. The IDE takes a resource-centric view of development. Instead of starting from the code and using it to create things such as menus and dialog boxes, you start with the menus and dialog boxes and use them to generate the required code. One feature missing from WinGEN is the ability to see the interface before any code has been generated. The Java program that uses the interface must be compiled and run before you can see how the interface will look. The commercial version of WinGEN for Java includes some features not commonly available in other IDEs at this time, such as support for specific types of ASCII text databases and tables. A system called CodeHooks handles advanced programming--for writing Java code to handle special circumstances that WinGEN can't handle. These hooks--blocks of code that accomplish specific tasks such as a special event handler--are kept separate from the code WinGEN automatically generates. This separation of code enables programmers to change the GUI and plug CodeHooks back in without reentering any code. ### How to Get It For more details about WinGEN, the opportunity to download WinGEN Lite at no cost, or to purchase the full version online, visit the home page for WinGEN: `http://www.pro-c.com/products/wfj/java.html` The phone number at Pro-C for inquiries related to the software is (813) 227-7762; the company's e-mail address for comments and questions regarding WinGEN is `support@ pro-c.com`. ## Rogue Wave JFactory Unlike most of the development tools being introduced for Java, JFactory is being offered as an interface builder rather than an IDE. However, because JFactory enables the placement of event-handling code from within the program and also provides a way to compile and test programs during development, it's close enough to a full IDE to be worthy of consideration. Although JFactory can be used in conjunction with any editor and Java compiler, a default editor is provided and JFactory is initially set up to use the JDK compiler. ### System Requirements Versions of JFactory are available for the following platforms: Microsoft Windows 95 and Windows NT systems running a 486 or better with 16M of memory, 25M of hard disk space, and the Java Developer's Kit version 1.0.2. SPARC Solaris 2.4 or 2.5 running UNIX with 25M of hard disk space, an applet browser, JDK version 1.0.2, and X11R5. You must have enough memory to run X11R5, the JDK compiler, and an applet browser. HP-UX 10.01 systems with 25M of hard disk space, an applet browser, the JDK version 1.0.2, and X11R5. The memory requirements are the same as for Solaris systems. IBM OS/2 Warp 3.0 systems with 25M of hard disk space, 4M of memory not used by OS/2, a two-button mouse or pointing device, and the JDK version 1.0.2 build os2-19960412. ### Overview JFactory is a sophisticated interface builder based on zApp Factory, a multiplatform C++ application framework from Rogue Wave. The software has a large number of features that facilitate rapid application design, and the product benefits from the experience Rogue Wave has accumulated with its other programming tools. The primary offering of JFactory is its visual, drag-and-drop editor for interface creation. This graphical user interface developer is head-and-shoulders above many of the other visual development tools currently available. The JFactory software is not considered to be a full IDE because it does not provide its own compiler, debugger, or other tools. However, JFactory's visual editor is so easy to use, and so capable, that it may compensate for the loss of some integrated development offerings. This open environment, a trait of Rogue Wave's programming software, enables any compiler or debugger to be used from within JFactory. At any stage in the development process, you can test the interface you have created. Another useful feature is that custom components can be integrated easily into the toolbar alongside standard components such as text labels, text fields, and radio buttons. One thing JFactory offers that sets it apart from most other IDEs is its ability to import `.rc` and `.dlg` files created with other programming environments. A lot of the source code associated with interface components is generated automatically by JFactory. Custom code that must be added is protected from modification so that you can change the interface afterward without overwriting your changes to the source code. JFactory has a robust system for creating the interface: You can use drag-and-drop and mouse movements to place components, and you can also place components with numeric input. The height, width, and x,y coordinates of a component can be set from a properties dialog box. This approach makes it much easier to cure the problem of wandering components that are difficult to align correctly. ### How to Get It For more details about JFactory and the opportunity to download a demo version or to purchase it online, visit Rogue Wave's home page for JFactory: `http://www.roguewave.com/products/jfactory/jfactory.html` The e-mail address for comments and questions regarding JFactory is `support@roguewave.com`. ## Metrowerks CodeWarrior Metrowerks CodeWarrior is the only Java IDE that supports three other programming languages (C, C++, and Pascal) in the same environment. In addition, CodeWarrior supports all these languages on both the Macintosh and Windows 95/NT platforms. CodeWarrior ships standard with support for all four languages, meaning that Java developers have the option of using other languages without purchasing any additional software. ### System Requirements The minimum requirements for the Macintosh version of CodeWarrior are a 68020 or greater processor (or a PowerPC 601 or greater), Macintosh System 7.1 or later, 8M of RAM (16M preferred), and 65M of hard disk space. The Windows version of CodeWarrior requires at least a 486 or higher processor, Windows 95 or NT, and 16M of RAM. ### Overview CodeWarrior has been well established in the Macintosh community for some time now as the standard Macintosh C/C++ development environment. For this reason, it isn't surprising that it has quickly gained popularity as a Java development environment--at least on the Mac. The CodeWarrior IDE includes a project manager, resource editor, text editor, graphical debugger, and class browsers--basically everything you expect in a professional development environment. CodeWarrior's wide support for Macintosh C/C++ developers migrating to Java will no doubt give it a broad user base and establish it as a major player on the Java front. It still isn't clear how it will fare in the much more competitive Windows development tool market (where Microsoft, Symantec, and Borland have traditionally ruled). Only time will tell, but Metrowerks is certainly in the race with a solid product. ### How to Get It You can find out more about CodeWarrior if you drop by Metrowerks' products home page: `http://www.metrowerks.com/products/` ## Summary The Java Development Kit provides a wealth of information, including the tools essential to Java programming. In this chapter, you learned about the different components of the JDK, including tools, applet demos, and the Java API source code. Although you learn more about some of these tools throughout the rest of the book, it's important to understand what role each tool plays in the development of Java programs. A strong knowledge of the information contained in the Java Development Kit is necessary to becoming a successful Java developer. However, you shouldn't stop with the Java Development Kit. In this chapter, you also saw how third-party IDEs can make Java development much easier. Hopefully, you now have a good idea about the types of tools available so that you can begin putting together your own Java development toolkit.
| ©Copyright, Macmillan Computer Publishing. All rights reserved.