Preview only show first 10 pages with watermark. For full document please download

Support Readiness Document Forte For Java, Community Edition

   EMBED


Share

Transcript

Support Readiness Document Forte for Java, Community Edition, Version 1.0 Sun Microsystems, Inc. Market Development & Developer Relations Support Readiness Education Support Readiness Document Forte for Java, Community Edition, Version 1.0 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303 U.S.A. Version: 1.0 Release Date: May 31, 2000  2000 by Sun Microsystems, Inc.—Printed in USA. 901 San Antonio Road, Palo Alto, CA 94303-4900 All rights reserved. No part of this work covered by copyright may be duplicated by any means—graphic, electronic or mechanical, including photocopying, or storage in an information retrieval system—without prior written permission of the copyright owner. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 (October 1988) and FAR 52.227-19 (June 1987). The product described in this manual may be protected by one or more U.S. patents, foreign patents, and/or pending applications. TRADEMARKS: Forte, Java, JSP, JVM, Sun, Sun Microsystems, JavaBeans, Javadoc, JavaHelp, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SPARC, SPARCStation, and UltraSPARC are trademarks or registered trademarks of SPARC International, Inc. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the United States and other countries. PostScript is a trademark or registered trademark of Adobe Systems, Incorporated, which may be registered in certain jurisdictions. Mozilla is a trademark or registered trademark Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303 U.S.A. Table of Contents Preface vi 1.0 Forte for Java, Community Edition, Version 1.0 Overview 1 1.1 Features, Advantages, and Benefits 1 1.2 Changes and New Features 2 2.0 Product Distribution 2 2.1 Source Code License 2 3.0 Requirements and Dependencies 2 3.1 System Requirements and Dependencies 2 3.1.1 Disk Space Needed to Install Forte for Java 2 3.1.2 Recommended Hardware Requirements 2 3.1.2.1 SPARC 2 3.1.2.2 Intel x86/Windows 3 3.1.2.3 Intel x86/Linux 3 3.1.2.4 Intel x86/Solaris 3 3.2 Software Requirements and Dependencies 3 3.2.1 Operating Systems and Versions Supported 3 3.2.2 Java 2 Software Development Kit 3 3.2.2.1 Solaris Operating Environment 3 3.2.2.2 Windows Platform 4 3.2.2.3 Linux Platform 4 3.2.3 Product Limitations 4 3.3 Product Compatibility 4 3.3.1 Versions 4 3.3.2 Backward/Forward Compatibility With Other Versions 4.0 Downloading Forte for Java 4 4.1 Name and Size of Download Files 4.2 Steps to Download 5 5.0 Installing Forte for Java 4 5 5 5.1 Pre-Installation Considerations 5 5.1.1 Hardware and Software Requirements SUN MICROSYSTEMS, INC. 5 i Table of Contents 5.1.2 5.1.3 5.1.4 5.1.5 Java 2 Software Development Kit 5 Disk Space 6 Estimated Time Needed to Install 6 Linux 6 5.2 Installation Details 6 5.2.1 Directories Created at Installation 5.3 How to Install Forte for Java CE 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 6 7 Solaris Operating Environment 7 Windows Platform 7 Linux Platform 8 class Install for All Platforms 8 Shared Installation 9 5.3.5.1 Solaris Operating Environment 5.3.5.2 Windows NT Platform 10 10 5.4 Post-Install Considerations 11 5.5 Common Problems with Installation 11 6.0 Uninstalling Forte for Java Community Edition 6.1 Pre-Uninstall Considerations 6.1.1 Estimated Time Needed to Uninstall 6.2 How to Uninstall Forte for Java CE 6.2.1 Windows 13 6.2.2 rpm 13 6.2.3 All Other Platforms 13 13 13 13 14 6.3 Post-Uninstall Considerations 14 6.3.1 Files Left Over After Uninstall 6.3.1.1 Windows 14 6.3.1.2 All Platforms 14 14 6.4 Common Problems with Uninstall 14 6.4.1 Windows 14 6.4.2 Solaris/Linux 14 7.0 Configuration 15 8.0 Key File Descriptions 8.1 Important Files 15 15 8.1.1 Windows Specific 15 8.1.2 Solaris/Linux 15 8.1.3 All Platforms 15 8.2 Command Line Switch Settings 16 8.2.1 Windows 16 8.2.2 Solaris/Linux 16 8.2.3 Allowable Switches 16 9.0 Administering Forte for Java 10.0 Using Forte for Java 17 10.1 Launching Forte for Java 10.1.1 Single-User Mode 17 17 17 SUN MICROSYSTEMS, INC. ii Table of Contents 10.1.2 Multi-User Mode 10.2 Templates 17 10.3 Managing Files 17 17 10.3.1 Opening Files 18 10.3.1.1 From the IDE 18 10.3.1.2 From the Object Browser 10.4 Creating Objects 18 18 10.4.1 Main Window 18 10.4.2 Explorer Window 18 10.5 Editor 19 10.5.1 Java Code Completion 19 10.5.2 Editor Customization 19 10.6 Compilation 19 10.6.1 Compiling Objects 20 10.6.1.1 Switching Default Compiler for a Project 10.6.1.2 Switching Compiler for a class 20 10.7 Executing Java Applications 20 20 10.7.1 External Execution 21 10.7.2 Internal Execution 21 10.7.2.1 Setting the Executor 21 10.7.2.2 Executing from the Explorer Window 21 10.7.2.3 Executing from the Editor Window 21 10.8 Debugging Your Java Classes 22 10.8.1 Breakpoints 22 10.8.1.1 Adding Breakpoints 22 10.8.1.2 Deleting Breakpoints 22 10.8.2 Threads 22 10.8.3 Watches 22 10.8.3.1 Setting Watches 23 10.8.3.2 Deleting Watches 23 10.8.4 Starting the Debugger 23 10.8.5 Debugger Types 23 10.8.5.1 Changing Debugger Type 23 10.9 Designing Visual Classes with the Form Editor 24 10.9.1 10.9.2 10.9.3 10.9.4 10.9.5 10.9.6 Opening the Form Editor 24 Creating a New Form 24 Adding Components 24 Copying Components 25 Reordering Components 25 Working with Layouts 25 10.9.6.1 Changing the Layout 25 10.9.6.2 Customized Layout Managers 25 10.9.7 Working with Source Code 26 10.9.7.1 Guarded Text 26 10.9.8 Developing Java Server Pages 26 10.9.8.1 Creating a Java Server Page File 26 10.9.8.2 Editing a Java Server Page File 26 10.9.8.3 Using the Java Server Pages Wizard 26 SUN MICROSYSTEMS, INC. iii Table of Contents 10.9.8.4 Compiling a Java Server Page 27 10.9.8.5 Analyzing Errors 27 10.9.8.6 Selecting a Compiler for the Java Server Page 10.9.8.7 Executing a Java Server Page 27 10.9.9 Searching and Creating Javadoc Documentation 27 10.9.9.1 Adding a Javadoc Directory 27 10.9.9.2 Searching Javadocs 27 10.9.9.3 Generating Javadocs 27 10.9.9.4 Viewing or Changing Options 28 10.9.9.5 Changing Documentation Directories 28 11.0 Bug Fixes 27 28 11.0.1 Pre-Release Bug Fixes 28 11.0.2 Post-Release Bug Fixes 29 12.0 Performance and Tuning Recommendations 29 12.1 12.2 12.3 12.4 Running Forte for Java with 64 MB of Memory 29 Java Software Development Kit 1.3 Release Candidate 29 Virtual Memory (Windows Only) 29 Swap File (Windows Only) 29 12.4.1 Windows NT/2000 29 12.4.2 Windows 95/98 30 12.5 Windows NT File System Partitions 30 12.6 Color Depth 30 12.7 Network Drives 30 13.0 Troubleshooting 30 13.1 Installation and Configuration “Gotchas” 30 13.1.1 13.1.2 13.1.3 13.1.4 13.1.5 13.1.6 13.1.7 13.1.8 Web Resources - Installation 30 Before Installation 31 Initial Installation 31 Uninstall 31 Reinstall 31 Updates 31 Backing Out Updates 31 Configuration 32 13.1.8.1 Installation Directory 32 13.1.8.2 Java Virtual Machine 32 13.1.8.3 Update Center 32 13.2 Common User/System Administrator Errors 32 13.3 Common User Questions 32 13.3.1 13.3.2 13.3.3 13.3.4 Frequently Asked Questions 32 Newsgroups and Forums 32 Early Access Program 33 Paid Support 33 13.4 Error Message Guide 33 13.5 Known Bugs and Their Workarounds 33 13.5.1 Forte for Java Bug Parade 33 SUN MICROSYSTEMS, INC. iv Table of Contents 13.5.2 13.5.3 13.5.4 13.5.5 Sun’s Bug Parade 33 Known Bugs 34 Bug Report Form 34 Internal Bug Report 34 14.0 Reference Information 34 14.1 Technical Documentation 34 14.2 Additional References 35 14.2.1 Frequently Asked Questions 14.2.2 White Papers 35 SUN MICROSYSTEMS, INC. 35 v Preface This document provides Support Readiness information for Forte for Java, Community Edition, Version 1.0. The goal of Support Readiness Documents (SRDs) is to help support engineers prepare to support Software Products and Platforms Division products. SRDs are not designed to provide comprehensive product training (see the product documentation or Sun Education for this). Instead, they focus on issues immediately relevant to support, such as installation, configuration, and common user problems. Document Format Options: Portable Document Format (PDF) and PostScript (PS) The Forte for Java, Community Edition, Version 1.0 SRD can be viewed in PostScript or PDF format. The PDF version of the document allows navigation via a table of contents frame, and the benefit of live cross references and web links. Text that is underlined and in blue, such as the uniform resource locator (URL) in this paragraph, are clickable links in the PDF version of the document. (Note: page numbers in the PDF document refer to printed pages, and will not coincide with the page numbers in the PDF reader status bar.) Although the blue color and underlining appear in the PostScript version, there are no live links when viewing that version. Typographic Conventions This document uses the following type conventions: • The names of commands, files, Java objects, Java classes, and directories are shown in regular monospace font. • Text that is a placeholder to be replaced with a real name or value appears in italic type; for example: unzip jsdt-1.4.zip -d destination directory. • Text that you type, when shown alongside computer output such as a command prompt, is shown in bold monospace font. The marker “prompt>” (in regular monospace font) represents the actual command prompt you would see on your screen, which may vary depending on your specific environment, shell, or platform. For example: Solaris prompt> ls -l. • The names of menu items, buttons, windows, and keyboard keys appear in regular font with initial capitals, such as the Enter key. SUN MICROSYSTEMS, INC. vi Preface • URLs that are clickable web links in the PDF version of the document are shown in blue, underlined monospace font, as in http://java.sun.com. Although the blue color and underlining appears in the PostScript version, there are no live links when viewing that version. • URLs that are not clickable web links are shown in regular monospace font, such as jsdt://stard:5555/socket/Session/chatSession. • Cross-references to other sections of the document are shown in regular font but are blue and underlined, as in, See Section 1.0, “JSDT Overview.” In the PDF version of the document, these are clickable links to the indicated section. Although the blue color and underlining appears in the PostScript version, there are no live links when viewing that version. • New terms and book titles appear in italic type. SUN MICROSYSTEMS, INC. vii Forte for Java, Community Edition, Version 1.0 1.0 Forte for Java, Community Edition, Version 1.0 Overview Forte™ for Java™ Community Edition, Version 1.0 (FFJ) sets the standard for a new class of Java Integrated Development Environments (IDEs). Fully modular, this release merges the power of a classic cross-platform development environment with unparalleled extensibility. Further, the Community Edition (CE) is a tool for all developers and is distributed free of charge. Forte for Java is a development tool that allow programmers to fully utilize the strengths of Java. This full-featured IDE combines support for all stages of application development including visual graphical user interface (GUI) design, editing, compilation, and debugging, helping developers create platform independent solutions. For more information see the following web site: http://www.sun.com/forte/ffj/ce 1.1 Features, Advantages, and Benefits Using Forte for Java speeds the Java application development cycle. The Community Edition takes advantage of the following features: • Advanced Swing support for designing user interfaces. • The Form Editor for generating exceptionally clean code with no special comments or proprietary classes. • A new, faster editor with syntax coloring supporting time-saving functionality like dynamic source code completion. • The new Object Browser allows browsing the hierarchy of Packages, Objects, and Object Members. • A multi-threaded debugger allows setting of watches and breakpoints, and following threads. • The Update Center allows dynamic upgrading the IDE with new features. SUN MICROSYSTEMS, INC. 1 of 35 Product Distribution 1.2 Changes and New Features Prior to this release, Forte for Java, CE was available in various beta versions. During this period of time there were constant changes and enhancements to the existing features. For this release, no new features were added and the outstanding bugs were fixed. Japanese localization is scheduled to be released in the fourth quarter of Fiscal Year 2000. 2.0 Product Distribution Currently, customers can download the Forte for Java, Community Edition, Version 1.0 from the following web site: http://www.sun.com/forte/ffj/ce Forte for Java, CE is also available on CD-ROM for $19.95. The CD-ROM contains files for all of the Forte for Java, CE installation options. Click on the hyperlink text, order the CD, at the following web site: http://www.sun.com/forte/ffj/ce/download.html The product is free of charge; however, there are some licensing terms and agreements. 2.1 Source Code License The source will be available under the Mozilla™ public licensing model. See the following web site for details: http://www.sun.com/smi/Press/sunflash/ 2000-03/sunflash.20000313.2.html 3.0 Requirements and Dependencies 3.1 System Requirements and Dependencies 3.1.1 Disk Space Needed to Install Forte for Java Approximately 45 MB is required for the completed installation on all supported platforms. 3.1.2 3.1.2.1 Recommended Hardware Requirements SPARC • Minimum configuration SPARCStation™ 5, 170 Mhz, 128 MB memory • Recommended configuration UltraSPARC™ 5, 333 Mhz, 256 MB memory • Optimal configuration UltraSPARC 10, 440 Mhz, 512 MB memory SUN MICROSYSTEMS, INC. 2 of 35 Requirements and Dependencies 3.1.2.2 Intel x86/Windows • Minimum configuration Pentium processor, 133 Mhz, 64 MB memory • Recommended configuration Pentium processor, 300 Mhz, 128 MB memory • Optimal configuration Pentium processor, 300 Mhz, 192 MB memory Note: If you are running on a Windows system with 64 MB of memory, it is recommended that you set the maximum Java heap size to 48 MB to prevent disk swapping. Set the configuration file’s (forte4j.cfg) startup flag to -Xmx48m. 3.1.2.3 Intel x86/Linux The Java Virtual Machine (JVM™) for Linux is more resource-intensive than the Windows JVM, so Linux users may want to have a higher memory configuration. Consequently, the minimum configuration shown in Section 3.1.2.2,“Intel x86/Windows,” may be inadequate for Linux users. 3.1.2.4 Intel x86/Solaris Use the requirements shown in Section 3.1.2.2, “Intel x86/Windows.” 3.2 Software Requirements and Dependencies 3.2.1 Operating Systems and Versions Supported The following operating systems are currently supported for this release of Forte for Java, CE: • Solaris™ Versions 6 and 7 • Windows 95, 98, and NT • Linux Red Hat version 6.1 Note: There are plans to support Windows 2000, other versions of Red Hat Linux, and different vendors of Linux in the future. At the time of this document’s development, both Windows 2000 and Forte for Java were in beta test. 3.2.2 Java 2 Software Development Kit To run successfully, the installation procedure requires that a Java 2 compatible virtual machine (JVM) be installed on your system. If you do not yet have this capability, you must install the JVM prior to running the Forte for Java installation. 3.2.2.1 Solaris Operating Environment The latest version of the Java Software Development Kit (SDK) for Solaris (version 1.2.1) is available for download from the following web site: http://www.sun.com/solaris/java SUN MICROSYSTEMS, INC. 3 of 35 Downloading Forte for Java 3.2.2.2 Windows Platform The latest version of the Java SDK for Windows (version 1.2.2) is available for download from the following web site: http://java.sun.com/products/jdk/1.2 Preliminary testing shows that it also runs well with the SDK 1.3 release candidate. This version is available for download from the following web site: http://java.sun.com/products/jdk/1.3 3.2.2.3 Linux Platform The latest version of the Java SDK for Linux (version 1.2.2) is available for download from the following web site: http://java.sun.com/products/jdk/1.2/download-linux.html 3.2.3 Product Limitations The following are current limitations: • • • • • Will not generate exe file No decompiler (class to java) No mousewheel (trackball) support No support for multiple monitors Minimal support for application servers, in the sense that not all applications servers will be supported 3.3 Product Compatibility 3.3.1 Versions Forte for Java, CE is the first version that Sun Microsystems™, Inc. is releasing. Prior versions belonged to Netbeans, a company that Sun™ acquired. Their versions are not supported: • Developer 2.1.2 • Developer X2 2.1.2 3.3.2 Backward/Forward Compatibility With Other Versions The versions listed in Section 3.3.1,“Versions,” are not compatible with this release of Forte for Java, CE. Backward/forward compatibility is planned for future Sun releases of Forte for Java. 4.0 Downloading Forte for Java For this release of Forte for Java, Community Edition, there are four different installation options: • • • • Solaris Windows Linux Java class (for all platforms) SUN MICROSYSTEMS, INC. 4 of 35 Installing Forte for Java The different files for the installation options, including documentation, can be downloaded from the following web site: http://www.sun.com/forte/ffj/ce/download.html In addition, the web page includes links to the current Java SDKs and the information for obtaining Forte for Java on CD-ROM. 4.1 Name and Size of Download Files The filenames and approximate sizes for each of the installation options is shown in Table 1, “Download Files.” TABLE 1. Download Files Platform File Type File Name Size (MB) Solaris UNIX sh forte_ce_1_0.sh 9.9 Windows Windows exe forte_ce_1_0.exe 11.8 Linux Red Hat rpm ForteCE-FCS-1_0.noarch.rpm 9.5 All Java class forte_ce_1_0.class 9.9 4.2 Steps to Download 1. Type the following URL into your browser: 2. 3. 4. 5. 6. http://www.sun.com/forte/ffj/ce/download.html Click on the icon or the hyperlink text: immediate download. Agree to the terms of the License Agreement. Enter your username and password. Note that new users will have to register. Select the desired download file. Select a directory for the downloaded file and wait for the transfer to complete. 5.0 Installing Forte for Java 5.1 Pre-Installation Considerations 5.1.1 Hardware and Software Requirements Verify that your system meets the criteria described in Section 3.1, “System Requirements and Dependencies.” 5.1.2 Java 2 Software Development Kit Remember that you must have a compatible version of the Java 2 SDK. See Section 3.2.2,“Java 2 Software Development Kit,” for more information. SUN MICROSYSTEMS, INC. 5 of 35 Installing Forte for Java 5.1.3 Disk Space Allow 45 MB for the completed installation on any platform. This is a “safe” space requirement, not a conservative one. A minimum of 30 MB is required and additional disk space may be necessary for intermediate, temporary files. 5.1.4 Estimated Time Needed to Install Installation will take five to ten minutes for any platform. 5.1.5 Linux You must have root access to install using the Red Hat Package Manager (rpm) installation option on Linux. 5.2 Installation Details 5.2.1 Directories Created at Installation When you install Forte for Java on your machine, the following subdirectories and files are created in your installation directory: • beans directory— contains JavaBeans™ components installed in the IDE • bin directory — includes the IDE launchers and the forte4j.cfg file on • • • • • • • • Windows installations • fastjavac directory — holds its executable and addtopath.bat which is used by the startup batch file. Development directory — the default directory mounted by your filesystem. Objects you create in the IDE will be saved here unless you use the IDE to mount other directories instead. docs directory — contains the hypertext markup language (HTML) files for the User’s Guide, QuickStart Guide, and the various tutorials. javadoc directory— the default directory mounted in the IDE’s Javadoc™ repository. Javadoc documentation that you create in the IDE will be stored here. lib directory — contains the jar files that comprise the IDE’s core implementation and the open application programming interfaces (APIs). • ext directory — contains extensions to the IDE for features such as JavaHelp™, Absolute Layout, javac, and regular expressions. • patches directory — any jar or zip file included in this folder will be automatically included at the beginning of the IDE’s startup CLASSPATH. That is, there will be a patch against the core. modules directory — any jar file in this folder is an IDE module. The ext subdirectory contains libraries used by modules. sources directory — sources for libraries which may be redistributed with user applications. system directory — includes files and directories used by the IDE for special purposes. It is mounted in the IDE as a hidden file system. • forte4j.log file — provides information useful when seeking technical support. • project.last file — contains information on Forte for Java projects. uninstall.class file — the uninstaller. SUN MICROSYSTEMS, INC. 6 of 35 Installing Forte for Java Other files that might be of interest are: • ParserDB file — holds databases that are used for Java code completion and other Editor functions. • • • • Startup file — holds classes that are run at IDE startup. Actions file — IDE actions which appear in Global Options under Actions. Applet file — policy file for debugging applets. Bookmarks file — web browser bookmarks. 5.3 How to Install Forte for Java CE There are several installation options of Forte for Java, Community Edition. The resulting software in each of these formats is identical; it is merely bundled in different installation manners for ease of use on different platforms. Use the format provided for your platform, or use the Java class installation, which runs on all platforms. Remember that before you begin, the Java 2 SDK, Standard Edition must be installed on your system. If you do not have it, you will need to download and install this software before you can run the Forte for Java installation routine. See Section 3.2.2,“Java 2 Software Development Kit,” for Java 2 SDK installation information. Note: If you are installing Forte for Java in a multi-user environment, see the instructions provided in Section 5.3.5, “Shared Installation.” The information in Section 5.3.2 through Section 5.3.4 are intended for single-user environments. 5.3.1 Solaris Operating Environment 1. Change your working directory to the location where you have saved the forte_ce_1_0.sh installation file. 2. Launch the installer by typing the command at the system prompt: prompt> sh forte_ce_1_0.sh 3. The installation program will attempt to locate a Java 2 virtual machine on your system. The installer displays a menu listing any JVM found and gives you the option to select one of them or specify the path to another virtual machine. 4. Follow the InstallShield dialogs as you normally would. Specify a location within your home directory as the final installation directory. 5. Once the installation is complete, launch Forte for Java using the forte4j.sh script in the bin subdirectory of your installation directory: prompt> sh forte4j.sh 5.3.2 Windows Platform 1. Double-click the forte_ce_1_0.exe file to launch the InstallShield application. 2. The install routine will attempt to locate a Java 2 virtual machine on your system. The installer displays a menu listing any JVM found and gives you the option to select one of them or, by using the browser, select another virtual machine. If the installer fails to locate a JVM, you must use the browser to locate one before you can continue. 3. Follow the InstallShield dialogs as you normally would. SUN MICROSYSTEMS, INC. 7 of 35 Installing Forte for Java 4. Once installation is complete, you will have a shortcut to Forte for Java on your desktop. On your Start menu, you’ll also have a Forte for Java entry containing shortcuts to the Community Edition README file and the Forte for Java web site. Four exe files will be available in the bin folder for launching Forte for Java: • forte4jw.exe — launches Forte for Java without a console window. This launcher is used when you launch the IDE from the shortcut on the desktop or from the Start menu. • forte4j.exe — launches Forte for Java with a console window that includes standard error and standard output from the IDE. On the console, you can press CTRL+BREAK to get a thread dump or CTRL+C to immediately terminate the program. • forte4jw_multiuser.exe — launches a multi-user version of Forte for Java without a console window. When you first run this executable, you are prompted to enter a directory where your files will be stored. This information will be placed in your Windows registry, so that the directory you specify in the prompt will be used whenever you launch the IDE in the future. • forte4j_multiuser.exe — launches a multi-user version of Forte for Java with a console window. 5.3.3 Linux Platform The Linux installation file is in the rpm format. If rpm is not supported by your Linux distribution or you have problems using rpm, use either the Java class installation option (forte_ce_1_0.class) or try the Solaris installation option (forte_ce_1_0.sh). 1. Become root. Note: Linux is the only installation that requires root access. 2. Open a command window and change your working directory to the location where you have saved the ForteCE-FCS-1_0.noarch.rpm installation file. 3. Launch the installer by typing the command at the system prompt: prompt> rpm -i ForteCE-FCS-1_0.noarch.rpm 4. Once the installation is complete, launch Forte for Java by typing the following command at the system prompt: prompt> forte4j 5.3.4 class Install for All Platforms 1. Change your working directory to the location where you have saved the forte_ce_1_0.class installation file. 2. Check to see if you currently have a CLASSPATH set. To do so, type the following command at the system prompt: prompt> set a. If you see a CLASSPATH listed in the output you have a CLASSPATH setting. If you have a CLASSPATH set and it does not include the current directory, interactively add the current directory to your existing CLASSPATH using one of the following methods. • UNIX with a Bourne shell: Type the following at the system prompt: prompt> CLASSPATH=.:$CLASSPATH;export CLASSPATH SUN MICROSYSTEMS, INC. 8 of 35 Installing Forte for Java • UNIX with a C shell: Type the following at the system prompt: prompt> setenv CLASSPATH .:$CLASSPATH • Windows: Type the following at the system prompt: prompt> set CLASSPATH=.;%CLASSPATH% b. If you do not have a CLASSPATH setting, interactively create a CLASSPATH using one of the following methods: • UNIX with a Bourne shell: Type the following at the system prompt: prompt> CLASSPATH=.;export CLASSPATH • UNIX with a C shell: Type the following at the system prompt: prompt> setenv CLASSPATH . • Windows: Type the following at the system prompt: prompt> set CLASSPATH=. 3. Launch the installer by typing the command at the system prompt: prompt> java forte_ce_1_0 Note: This step presumes you have a Java 2 virtual machine in your PATH. If not, you must either provide a fully qualified path to the Java interpreter executable or update your PATH setting. To interactively add the current directory to your existing PATH, use one of the following methods where SDK_dir indicates the fully qualified path to the Java interpreter executable: • UNIX with a Bourne shell: Type the following at the system prompt: PATH=.:SDK_dir;export PATH • UNIX with a C shell: Type the following at the system prompt: prompt> setenv PATH .:SDK_dir:$PATH • Windows: Type the following at the system prompt: prompt> set PATH=SDK_dir;%PATH% 4. Follow the InstallShield dialogs as you normally would. 5. Once the installation is complete, use the launch script (forte4j.sh) in your installation directory to launch Forte for Java. If you installed the software on a Windows machine, you will have shortcuts for launching Forte for Java on your desktop and on the Start menu. 5.3.5 Shared Installation This type of installation requires a user who can act as the administrator and who is responsible for maintaining, upgrading, and installing new modules. Module upgrades and installation of new modules should be performed by the administrator entirely within Forte for Java, using the Update Center. If a user who is SUN MICROSYSTEMS, INC. 9 of 35 Installing Forte for Java not the administrator upgrades modules or installs new modules, the updates will be made only to that user’s local installation directory, where personal settings and configuration files are stored. Other users will not be able to see or use the updated modules. Local modules are given preference to those in the shared installation, so if the administrator subsequently upgrades the same module to a newer version, the user will still have the older, local version. 5.3.5.1 Solaris Operating Environment 1. As root user, install as described above in Section 5.3.1,“Solaris Operating 2. 3. 4. 5. 6. Environment,” or Section 5.3.4, “class Install for All Platforms.” Install the software in a shared location, such as /usr/local/forte4j Change ownership of the forte4j directory tree to the administrator. If you have defined a user group, change ownership to also include that group where f4jadmin indicates the administrator and f4jusers indicates the group of users who will use Forte for Java: prompt> chown -R f4jadmin f4jusers /usr/local/forte4j Set the permissions on the installation directory (in this example, forte4j): prompt> chmod 750 forte4j The installation routine generates a file called forte4j_multiuser.sh in the installation directory. Create a symbolic link to this file from a location you use for your system executables (in this example, /usr/local/bin): prompt> ln -s ./forte4j_multiuser.sh /usr/local/bin/forte4j Launching Forte for Java depends on the user. a. Administrator: The administrator should start the application using the forte4j.sh command in the installation directory. b. Users: Assuming users have /usr/local/bin in their PATH, they can launch Forte for Java by typing forte4j on the command line. Otherwise, the user will need to include the fully qualified path to the linked file (/usr/local/bin/forte4j.sh) which is, in actuality the multi-user file, forte4j_multiuser.sh The first time a user launches the application on a multi-user installation, the launch script copies and creates configuration files under the user’s $HOME/forte4j_user directory. Thereafter, each user keeps their settings, preferences files, and development files in their own directories. 5.3.5.2 Windows NT Platform 1. Install the software on a Windows NT machine that will act as the server. Install as described in Section 5.3.2,“Windows Platform,” or Section 5.3.4, “class Install for All Platforms.” The installation directory should be write protected to normal users, but this is not mandatory. 2. Create a shared directory on the machine where you installed the product and map this onto the user’s local machine as a network drive. 3. The installation routine generates a file called forte4jw_multiuser.sh in the installation directory. SUN MICROSYSTEMS, INC. 10 of 35 Installing Forte for Java 4. Launching Forte for Java depends on the user. a. Administrator: The administrator should start the application using the forte4jw.sh command in the installation directory. The administrator should also update modules from the installation directory. a. Users: Users should launch Forte for Java from the mapped location using forte4jw_multiuser.exe The first time this is run, each user is prompted to enter a directory where their files will be stored. 5.4 Post-Install Considerations • Verify that your system meets the criteria described in Section 3.1, “System Requirements and Dependencies.” • Verify the compatibility of SDK as described in Section 3.2.2, “Java 2 Software Development Kit.”. • Run the forte4j.sh script provided with the installation to assure installation is operational. 5.5 Common Problems with Installation Below are the top seven frequently asked installation questions. For additional details on these and other questions, visit the following web site: http://www.sun.com/forte/ffj/ce/install_faq.html Problem: Which installation format should I use? Answer: For most platforms, there is a choice of installation routines. All installation formats require a suitable VM already installed on your system to run. Forte for Java requires a Java 2 (SDK 1.2) or later VM. If you do not have a compatible JVM installed already, download and install one prior to running the IDE installation. Problem: Does Forte for Java run on the Macintosh? Answer: As there is currently no Java 2 Virtual Machine for the Macintosh OS, Forte for Java will not run on a Macintosh running the Macintosh OS. Macintosh hardware supports Linux, and Forte for Java is available for Linux. Problem: How do I uninstall Forte for Java? Answer: Depending on your OS, and which installation format you used, there are several ways to uninstall the IDE. InstallShield will only uninstall files that were written to disk at install time — that is, your development, settings files, log files, and modules will not be removed. Remove any remaining directories and files manually to completely remove Forte for Java. As always, precautionary backups of any files you wish to keep are a good idea. SUN MICROSYSTEMS, INC. 11 of 35 Installing Forte for Java Problem: Installer generates error messages like: Exception in thread “main” java.lang.NoClassDefFoundError: xxx/class. Answer: You will see this message if you attempt to launch the installation routine including the class extension. The correct way to launch the class installation is to remove the class extension. Problem: Installation routine error messages like: Can’t find class nbxxxx or Unable to Execute: SETUP.EXE /SMS Answer: This is almost certainly due to one of the following: • A corrupt or interrupted download. • Insufficient disk space. Check to ensure you have plenty of free disk space for the installation archive to unpack and install. It is recommended that your available space be at least twice the size of the install file. • Conflicts with files in the TEMP directory. Older versions of InstallShield can leave files in your TEMP directory, which can then conflict with any other InstallShield packages you run. Try cleaning out your TEMP directory, and running the installation again. Forte for Java installations will not leave any files in your TEMP directory. On Windows machines, if none of the above help, try shutting down and rebooting your machine. Problem: How do I install or remove a plug-in module? Answer: • To install a module: Use the Auto Update feature (see Miscellaneous FAQs). Alternatively, if you already have the module, you can simply copy its jar file to the modules directory of your installation, and restart the IDE. • To remove the module: Disable it by selecting the desired module in Session Settings/Modules and setting the module's Enabled property to False. From that point the module will not be used by the IDE. • If you want to completely remove the module from the IDE: In the modules’ subdirectory of your installation, edit the file installedModules.xml, and remove the module's entry. Remove the module's jar file, if it has been installed in the modules subdirectory. SUN MICROSYSTEMS, INC. 12 of 35 Uninstalling Forte for Java Community Edition Problem: Can I install multiple versions of the IDE on the same system safely? Answer: Yes. There are only two important issues with running multiple versions of Forte for Java: • Installation directory - separate versions of Forte for Java must be installed to completely separate directories. • The SDK version selected or used during installation of Forte for Java. If you have more than one version of the SDK installed, you must take care to use the appropriate one during installation, as that version is used to generate the Forte for Java startup scripts, which set the CLASSPATH and the interpreter used. 6.0 Uninstalling Forte for Java Community Edition 6.1 Pre-Uninstall Considerations Depending on your operating system and which installation format you used, there are several ways to uninstall Forte for Java. For example, InstallShield will only uninstall files that were written to disk at install time. None of the uninstallation procedures remove your development, settings files, log files, and modules unless they were explicitly stored in the installation directories. Note: Precautionary backups of any files you wish to keep are always good idea. 6.1.1 Estimated Time Needed to Uninstall Uninstallation will take five minutes or less for any platform. 6.2 How to Uninstall Forte for Java CE 6.2.1 Windows Use the Control Panel → Add/Remove Programs dialog. 6.2.2 rpm Uninstall by typing the following command at the system prompt: prompt> rpm -e package-name where package-name is the name of the Forte for Java package. If you are unsure of the package names you have installed, type the following command at the system prompt: prompt> rpm -qa | grep Forte SUN MICROSYSTEMS, INC. 13 of 35 Uninstalling Forte for Java Community Edition 6.2.3 All Other Platforms 1. Change your working directory to the location where you installed Forte for Java. 2. If you have a Java interpreter executable in your PATH, type the following at the system prompt: prompt> java uninstall 3. This will launch a standard InstallShield Uninstall procedure. Simply follow the dialogs as you normally would. 6.3 Post-Uninstall Considerations There will be files and directories left over after uninstalling the product. You may need to remove them manually and, in some cases, the permissions may need to be changed since some files could have been installed with read-only permissions. 6.3.1 6.3.1.1 Files Left Over After Uninstall Windows The following directories are left over: • bin • lib • system 6.3.1.2 All Platforms In addition to any files the user created, the following directories are left over: • • • • • • • Development (if a package was created under this default directory) beans docs lib module system update (if updates were downloaded from the Update Center) Note: Other directories may include the ones you created during development. 6.4 Common Problems with Uninstall 6.4.1 Windows If Forte for Java was removed without using the Control Panel, you will have to remove the Forte for Java from the Windows registry. 6.4.2 Solaris/Linux On Solaris and Linux platforms make sure the PATH is set correctly before running the following command: java uninstall SUN MICROSYSTEMS, INC. 14 of 35 Configuration 7.0 Configuration Forte for Java requires that a Java 2 SDK to be installed. The configuration required for the SDK installation is to set the PATH environment variable. Once the PATH is set, Forte for Java can be installed and executed. Examples of how to set the PATH environment variable can be found in Section 5.3.4,“class Install for All Platforms,”. No other special configurations are needed. 8.0 Key File Descriptions The IDE stores the current settings in the system subdirectory of your installation and are contained in the files project.basic and project.last. Stored settings include which windows were open, their positions, and any IDE customizations you have made. The IDE maintains a log of major changes and errors; it is named forte4j.log. This file is most useful for resolving PATH issues and finding errors during operation. It shows the most recent changes to PATH statements and IDE add-ons as well as exception errors. The information will be in order from oldest to most recent. 8.1 Important Files 8.1.1 Windows Specific • forte4j.bat — The original script for running under Windows. Runs from an MS- DOS window. Allows the user to view the system information and other messages that are written to forte4j.log Note: Under Windows 98 it leaves the MS-DOS window open, so the user must close the window manually. • forte4j.exe — Pops up an MS-DOS window while running, but the window closes automatically when you exit the IDE. • forte4jw.exe — No MS-DOS window. • forte4j.cgf — File for adding options to Forte for Java in the Windows environment. 8.1.2 Solaris/Linux • forte4j.sh — The UNIX shell script invoked to start Forte for Java. 8.1.3 All Platforms • forte4j.policy — This file grants permissions, which include the following: • security (java.security.AllPermission) • Runtime (for example, queue print jobs, createClassLoader, modifythread, modifyThreadGroup, and exitVM) • files (execute ALL FILES) • AWT (accessClipboard) SUN MICROSYSTEMS, INC. 15 of 35 Key File Descriptions 8.2 Command Line Switch Settings 8.2.1 Windows You can set options when running the IDE on the command line, or by modifying the contents of the forte4j.cfg file. This file is located in the bin folder of the installation directory. If you set the switches using the forte4j.cfg file, you can enter the options using multiple lines. The loader tries to read this file before it starts parsing the command line options. Even Java applications options can be put in this file. 8.2.2 Solaris/Linux On Solaris or Linux platforms, you can modify the forte4j.sh file in the bin subdirectory of the installation directory, or you can create your own shell script that calls forte4j.sh with options. 8.2.3 Allowable Switches The following is a list of switches that you can use (either in a shell script or the forte4j.cfg file) when loading Forte for Java: • -jdkhome jdk_home_dir Use the Java 2 SDK specified in the jdk_home_dir argument instead of the default SDK. • -hotspot Use the HotSpot JVM. • -classic Use the classic JVM. By default, the HotSpot JVM is used. • -cp:p additional_classpath Add the CLASSPATH specified in the additional_classpath parameter to the beginning of the Forte for Java CLASSPATH. • -cp:a additional_classpath Append the CLASSPATH specified in the additional_classpath parameter to the end of the Forte for Java CLASSPATH. • -Jjvm_flags Pass the flag specified by the jvm_flags parameter directly to the JVM. Note: there is no space between -J and the argument. • -ui com.sun.java.swing.plaf.windows.WindowsLookAndFeel Run the IDE with the Windows look and feel. • -ui com.sun.java.swing.plaf.motif.MotifLookAndFeel Run the IDE with the Motif look and feel. • -fontsize fontsize Set the font size used in the IDE’s GUI. SUN MICROSYSTEMS, INC. 16 of 35 Administering Forte for Java 9.0 Administering Forte for Java The only administration requirement occurs when the multi-user installation is being used. Only the administrator should be using Update Center to apply the latest updates to Forte for Java. See Section 5.3.5,“Shared Installation,” for additional details. 10.0 Using Forte for Java 10.1 Launching Forte for Java Forte for Java can be launched in two ways: either in single-user mode or multi-user mode. These are described in the following sections. 10.1.1 Single-User Mode To launch single-user mode: • execute forte4j.sh (Solaris/Linux) • execute forte4j.exe (Windows) 10.1.2 Multi-User Mode To launch multi-user mode: • execute forte4j.sh (Solaris/Linux) (This is actually linked to forte4j_multiuser.sh. See Section 5.3.5.1, “Solaris Operating Environment.”) • execute forte4j_multiuser.exe (Windows) Note: When performing administrative tasks, the forte4j.sh file located in the installation directory should be used. See Section 5.3.5,“Shared Installation,” for details. 10.2 Templates In Forte for Java, you create new classes (as well as other objects) with templates. The template serves as a skeleton for the class and includes basic source code for that class. More information on templates is contained in Section 10.4, “Creating Objects.” 10.3 Managing Files Forte for Java provides two different tools for managing files in the IDE. • The Explorer — provides a hierarchical view of all files you use with the IDE. This includes applications you are developing, Javadoc files, and a view of running and debugging processes. In the Explorer, you can also mount directories that are on your local system or network so that they can be accessed from within the IDE. The Explorer is not only a place where you can manage files, but also a place where you can create objects and manage their properties. • The Object Browser — provides a Java-oriented view of your classes. Using either tool, the contextual menu is available for each node by right-clicking on the node. SUN MICROSYSTEMS, INC. 17 of 35 Using Forte for Java 10.3.1 Opening Files The Forte for Java Open File feature provides the ability to open existing (meaning not created in the IDE) source files in the IDE directly from a file chooser without the need to first mount directories under the Filesystems tab in the Explorer or navigate to them in the Explorer. 10.3.1.1 From the IDE To open a file in the IDE: 1. Choose Open File from the Main window. 2. A file chooser will appear asking which file you wish to open. (Browse to the directory your file is in, select it, and choose Open.) If the file is already accessible in the Explorer, then the file will open immediately and will usually be displayed in the Editor window. All objects you create when writing an application in Forte for Java are displayed under the Filesystems tab in the Explorer, where they can be added, removed, and edited. You can organize these objects in packages, which are visually represented by folder icons. The Object Browser gives you a Java-oriented perspective on your classes, enabling you to view a hierarchy of source files filtered the way you specify. 10.3.1.2 From the Object Browser To open the Object Browser, perform one of the following operations: • Click on the Browsing Workspace tab. • Choose Open Browser from the File menu or toolbar. 10.4 Creating Objects 10.4.1 Main Window To create an object through the Main window, use one of the following three methods to select the menu item New From Template: • The File menu • From the corresponding toolbar icon • Using the CTRL+n keyboard shortcut 10.4.2 Explorer Window If the Explorer is not open, choose Open Explorer from the File menu or from the toolbar. Find the package where you want to place the new object and right-click on it to bring up its contextual menu. (Packages are marked with a folder icon and are located under the Filesystems tab in the Explorer.) Choose New From Template, the template type from the first submenu, and the template itself from the second submenu. SUN MICROSYSTEMS, INC. 18 of 35 Using Forte for Java 10.5 Editor The Editor is a full-featured text editor that is integrated with the Form Editor, Explorer, Compiler, and Debugger. It is the default viewer for all Java, HTML, and plain text files, as well as any other types of files specified by installed extension modules. Double-click a Java or text object in the Explorer to open the Editor, or select the node of the object and press the Enter key. Any files that you subsequently open will also appear in the Editor with their own separate tabs in the bottom of the window. 10.5.1 Java Code Completion Forte for Java also incorporates a dynamic code completion feature, where you can type a few characters and bring up a list of possible classes, methods, variables, and other options, that can be used to complete the expression. To use Java code completion, perform the following: 1. Type the first few characters of the expression (for example, import javax. or 2. 3. 4. 5. 6. 10.5.2 someFile.getP). Press CTRL+SPACE (or pause after entering a period). The code completion box will then appear. Continue typing to narrow down the selection of items in the list. Use the navigation keys or the mouse to scroll through the list and select an expression. Press the Enter key to transfer the selected method into your file and close the code completion box. Press the Tab key to select the longest common substring matching the text you have typed (Bash-style context-sensitive completion) and keep the list box open. Editor Customization The Editor has other configurable settings, like font and color, abbreviation tables, formatting of generated code, appearance of the insertion point, and other options. Many of these settings are separately customizable for Java, HTML, and plain text under their respective subnodes, under Editor Settings in the Global Options window. 10.6 Compilation Forte For Java offers a wide array of compilation options, from different ways to bring up the Compile command to the ability to use different compilers and set a specific compiler for each class. After you initiate compilation of a class, the Output window appears if there are any compilation errors. If you double-click on the error in the Output window, the insertion point will jump to the line in the Editor that contains the error. Compilation progress is reported in the status line (next to the workspace tabs in the Main window). SUN MICROSYSTEMS, INC. 19 of 35 Using Forte for Java 10.6.1 Compiling Objects You can compile an object in the active Editor window tab or if selected in the Explorer by: • • • • Choosing Build→Compile from the main menu. Clicking on the Compile icon on the main toolbar. Pressing the F9 key. Right-clicking on the object in the Explorer and choosing Compile from the contextual menu. • Choosing one of several options for compiling packages, all available from the Build menu and toolbar on the Main window, and the contextual menu for packages in the Explorer. • Compiler Selection The IDE comes with support for fastjavac and javac compilers; the IDE uses fastjavac by default. fastjavac is a native compiler, meaning that there are different versions of it for each platform, but each version compiles into the same Java bytecode. fastjavac is available for the Solaris, Linux, and Windows platforms. It is possible to switch the default compiler type. When you switch the default compiler type, this switch affects all classes and templates for which the user has not specifically assigned a compiler type. 10.6.1.1 Switching Default Compiler for a Project To switch the default compiler type: 1. Choose Project→Settings... from the main menu to open the Project Settings window. 2. Select the Java Sources node in the left pane of the Project Settings window. 3. Select the default compiler type property and choose a new default compiler type from the dropdown list. 10.6.1.2 Switching Compiler for a class To switch compilers for a class: • Select the object under the Filesystems tab in the Explorer. Go to the object’s property sheet (by choosing View→Properties from the main menu). Click on the Execution tab in the Properties window. Rotate through the compiler types by double-clicking on Compiler, or click on the compiler property’s value and choose from the pull-down menu. 10.7 Executing Java Applications Java applications may be run in several ways. You can run your completed Java application external to Forte for Java using the usual techniques. However, the application can also be run while remaining in Forte for Java. SUN MICROSYSTEMS, INC. 20 of 35 Using Forte for Java 10.7.1 External Execution A new virtual machine (VM) is used for executing the application. This enables you to run applications that require a special VM or need to do operations that are not possible with internal execution (see Section 10.7.2, “Internal Execution.”) You can specify the VM executable (such as java.exe) and complete command line parameters together with CLASSPATH settings for the application. External execution also protects the IDE from application crashes and delays. 10.7.2 Internal Execution An application run using internal execution runs inside the Forte for Java IDE. This is advantageous because the application can modify the IDE itself and be loaded faster. However, it does impose at least two restrictions on the executed application. The application cannot install its own URLStreamHandlerFactory or SecurityManager. 10.7.2.1 Setting the Executor To set the executor for an object: 1. Select the object under the Filesystems tab in the Explorer. 2. Go to the object’s property sheet (if it is not already open, choose View Properties from the main menu) and click on the Execution tab. Rotate through the executors by double-clicking on Executor, or click on the executor property’s value and choose from the pull-down menu. If you want to pass command line arguments to executed Java applications: 1. Select the object in the Explorer. 2. Choose Build→Set Arguments from the main menu. 3. Enter the arguments in the dialog box, separated by spaces. 10.7.2.2 Executing from the Explorer Window To execute your Java application from the Explorer window: 1. Make sure that the Java object is executable (that it either has a main() method or is a subclass of Applet or JApplet). 2. Right-click on it and choose Execute from the contextual menu. 10.7.2.3 Executing from the Editor Window To execute your Java application from the Editor window: 1. Choose the Execute icon on the Main window. 2. Choose Build→Execute from the Main window. 3. Use the keyboard shortcut CTRL+F9. SUN MICROSYSTEMS, INC. 21 of 35 Using Forte for Java 10.8 Debugging Your Java Classes The Debugger can be used to present “snapshots” of the system state during execution. By placing breakpoints at key positions throughout your source code, the Debugger can halt at these points and display details of the current environment at that point in the source. You can effectively step through your code, monitoring execution as it occurs. You can also connect the debugger to an already-running process. The Debugger window is a three-tabbed display with tabs for Breakpoints, Threads, and Watches. 10.8.1 Breakpoints The Breakpoints tab simply lists the currently set breakpoints, showing the class name, and the line number or method on which the breakpoint has been set. 10.8.1.1 Adding Breakpoints To add a new breakpoint to your code: 1. Position the insertion point at the desired line in the Editor window. 2. Choose Add/Remove Breakpoint from the Debug menu or toolbar in the Main window, right-click on the line in the Editor and choose Add/Remove Breakpoint from the contextual menu. 3. Use the keyboard shortcut CTRL+F8. 10.8.1.2 Deleting Breakpoints To remove a breakpoint: 1. From the Editor window, position the insertion point on the line where the breakpoint has been set. 2. Choose Debug→Add/Remove Breakpoint from the Main window. 3. Use the keyboard shortcut CTRL+F8. 10.8.2 Threads The Threads tab displays all thread groups in the current debugging process. These thread groups are expandable hierarchies; each group contains other thread groups or single threads, which in turn contain CallStack and Locals nodes. 10.8.3 Watches The Watches tab lists all currently set watches. A watch is a node you can create in the Debugger window to display the current value of any variable of that name presently in scope. You can monitor the value of the variable as it changes during the execution of the program. SUN MICROSYSTEMS, INC. 22 of 35 Using Forte for Java 10.8.3.1 Setting Watches To set a watch: 1. Choose Add Watch from the Debug menu on the Main window. 2. Use the contextual menu of the root Watches item, on the Watches tab of the Debugger window. 3. Use the contextual menu of a variable you have selected in the Editor (double-click the variable to select it, and then right-click to bring up the context menu). 10.8.3.2 Deleting Watches To delete a watch: 1. Select the required watch. 2. Select delete from the context menu. 10.8.4 Starting the Debugger To initiate a debugging session: 1. Set a breakpoint and choose Debug→Start Debugging from the Main window. 2. Press the F5 key. By default, the IDE switches to the Debugging Workspace, where the Debugger window, the Editor with the source being debugged, and the Output window all open up. The Output window is split vertically, with Debugger output on the right and any output from the application being debugged on the left. When the Debugger reaches a breakpoint in your source, that breakpoint is highlighted in pink. The pink line will move through your source as you code as you step through its execution. Once execution has halted, use the Trace Into, Go To Cursor, Trace Over, Trace Out, and/or Continue menu or toolbar items under the Main window Debug menu (or the keyboard shortcuts F7, F8, CTRL+F7, and F5, respectively) to proceed. The Debug menu and toolbar also have Suspend All and Resume All options, which enable you to “pause” execution at any time and then continue from the point execution was suspended. 10.8.5 Debugger Types The debugging category is set for each separate object in the IDE. When you set debugging, you choose from a list of “debugger types,” each of which represents a specific configuration of a debugger. 10.8.5.1 Changing Debugger Type To switch an object’s debugging type: 1. Select the object under the Filesystems tab in the Explorer. 2. Go to the object’s property sheet (by choosing View→Properties from the main menu). 3. Click on the Execution tab in the Properties window. 4. Rotate through the debugging types by double-clicking on Debugger, or click on the Debugger property’s value and choose a type from the pull-down menu. SUN MICROSYSTEMS, INC. 23 of 35 Using Forte for Java 10.9 Designing Visual Classes with the Form Editor Forte for Java provides the Form Editor, which enables you to build forms for GUIs visually and have the code for them automatically generated. You can select items such as panels, scroll bars, menus, and buttons in the Component Palette, and place them directly on the Form Editor window. As you do, the IDE automatically generates the Java code to implement the design and behavior of the application. The Form Editor also uses your chosen layout manager to control the design-time layout of the form in the Form Editor window. If you change the layout manager or its parameters, the changes are displayed immediately. In addition, you can manage event handlers and customize the way code is generated for components. 10.9.1 Opening the Form Editor To open the Form Editor for existing forms, double-click on the form object in the Explorer or choose Open from its contextual menu.When a form is opened, the IDE (by default) switches to the GUI Editing workspace, and the following three windows are displayed: • Form Editor window — the design-time view of the form. • Editor window — contains the Java source for the form. If the Editor is already open, the form is opened on a new tab within that Editor window. • Component Inspector — displays the hierarchy of components on the active form, including the layout managers, menus, buttons, and non-visual components such as timers. The current selection of components is highlighted. Tabs on the property sheet in the bottom panel display the general, expert, code generation, and layout properties as well as the events of the selected component. 10.9.2 Creating a New Form To create a new form: • Use the New From Template command to create a new form from a template and open it in the Form Editor. Once you have created a new form, add components to it to create functionality. 10.9.3 Adding Components The easiest way to add components is by using the Component Palette. The Component Palette is a toolbar on the Main window, which holds commonly used visual components that you can add to forms. You can add a component merely by clicking on the component in the Palette and then clicking on the form in the Form Editor window. If you want multiple copies of a component within a form, you can copy and paste the components in the Component Inspector. SUN MICROSYSTEMS, INC. 24 of 35 Using Forte for Java 10.9.4 Copying Components To copy components: 1. Select the item in the Component Inspector or the Form Editor window (hold down the SHIFT or CTRL key to enable selecting more than one item). 2. Right-click the item(s) and choose Copy from the contextual menu. 3. Choose the destination container in the Component Inspector or the Form Editor window and choose Paste on its contextual menu. 10.9.5 Reordering Components Reordering components within the same container.To change the order of components in the Component Inspector, either: • Right-click on the component you want to move, and use the Move Up or Move Down items in its contextual menu. • Right-click on the parent container and choose Change Order from its contextual menu. You will get a dialog box for setting the order of all subcomponents in the container. 10.9.6 Working with Layouts The Form Editor in Forte for Java has advanced support for layout managers. In addition to absolute positioning, complex forms based on Flow Layout, Border Layout, Card Layout, Grid Layout, GridBag Layout, or Swing’s Box Layout are supported. 10.9.6.1 Changing the Layout To change the layout manager: 1. Right-click on the target container — either an empty part of the form in the Form Editor window or the node for the container in the Component Inspector. 2. Change the layout using the Set Layout submenu. 10.9.6.2 Customized Layout Managers It is also possible to use custom layout managers in the Form Editor. Any layout manager with a default constructor and that does not use constraints for adding components can be used in the Form Editor when designing. To install a custom layout manager: 1. Add the directory or jar archive containing the layout manager’s source or class to the IDE by choosing Tools→Add Directory or Tools→Add jar from the main menu. 2. Install the custom layout manager in the Component Palette by right-clicking on the layout manager’s class in the Explorer or Object Browser and choosing (Add to Component Palette... from the context menu). In the Palette Category dialog box that appears, select the Layouts category and click OK. SUN MICROSYSTEMS, INC. 25 of 35 Using Forte for Java 10.9.7 Working with Source Code The Editor window displays the code for the active opened form. The source code is always synchronized with the visual appearance of the form. Every change made in the Form Editor window or the Component Inspector is immediately reflected in the source code. Forms are stored in two files: • A java file, which contains the (partly) generated Java source. • A form file, which stores layout manager properties, the properties and layout constraints of JavaBeans components on the form, and other information. This file does not need to be distributed with your application. It is merely used to display the form in the Form Editor. 10.9.7.1 Guarded Text Some parts of the source code generated by the Form Editor are not editable directly in the Editor. The background of these guarded blocks is shaded. Guarded text includes: • The block of variable declarations for the components on the form. • The initComponents() method, in which all the form initialization is performed (this method is called from the form’s constructor). • The header (and trailing closing brace) of all event handlers. 10.9.8 Developing Java Server Pages Forte for Java provides support for creating, compiling, and editing Java Server Pages (JSP™s). In addition, you can use the JSP Wizard to create standard and error-handling JSPs using JavaBeans properties for dynamic content display and server-side processing. 10.9.8.1 Creating a Java Server Page File To create a new JSP file: 1. Choose File→New from template from the main menu. 2. In the Create From Template Wizard that appears, expand the node of the JSP and Servlet folder, select JSP and click Next. 3. In the next step of the Wizard, choose the name and folder (package) of your JSP file and click Finish. 10.9.8.2 Editing a Java Server Page File To edit a JSP file: 1. Double-click on the file in the Explorer or Object Browser. 2. Type your JSP code directly into the Editor window that appears. 10.9.8.3 Using the Java Server Pages Wizard To create a JSP with the JSP Wizard: • Choose Tools | JSP Wizard from the main menu. SUN MICROSYSTEMS, INC. 26 of 35 Using Forte for Java 10.9.8.4 Compiling a Java Server Page To compile a JSP: • Right-click on the JSP file in the Explorer or Object Browser and choose Compile from the contextual menu. 10.9.8.5 Analyzing Errors To analyze servlet source for compilation errors: • Right-click on the JSP file in the Explorer or Object Browser and choose View servlet from the contextual menu. 10.9.8.6 Selecting a Compiler for the Java Server Page To select a compiler for the JSP: • In the file’s property sheet, select the Execution tab, select the Servlet Compiler property, press the drop-down arrow that appears, and choose the compiler from the combo box. 10.9.8.7 Executing a Java Server Page To run a JSP page: • Right-click on the JSP’s node in the Explorer or Object Browser and choose Execute from the contextual menu. 10.9.9 Searching and Creating Javadoc Documentation Forte for Java enables you to easily browse standard API documentation and other Javadoc files from within the IDE and create Javadoc documentation for your own classes. Before you can do Javadoc searches within the IDE, directories (for jar or zip files) with standard API documentation need to be in the search path. 10.9.9.1 Adding a Javadoc Directory To add a Javadoc documentation directory to the Javadoc tab in the Explorer: 1. In the Explorer, select the Javadoc tab, right-click on the Javadoc node, and choose Add Directory... from the contextual menu. 2. In the Mount Directory dialog box choose the directory with the Javadoc documentation. 10.9.9.2 Searching Javadocs To search on Javadoc documentation: 1. Bring up the Javadoc Search Tool dialog box by pressing CTRL+F1 or choosing Help | Javadoc Index Search from the Main window. 2. Use the combo box in the dialog box to type or select the search string, and press Find or ENTER on your keyboard. 10.9.9.3 Generating Javadocs To generate Javadoc documentation: 1. Select the packages and/or source files for which you would like to create documentation in the Explorer or in the Object Browser. SUN MICROSYSTEMS, INC. 27 of 35 Bug Fixes 2. Right-click on the object’s node and choose Tools | Generate Javadoc from the contextual menu. A dialog box will appear asking you to name the directory in which you want the Javadoc documentation generated. 10.9.9.4 Viewing or Changing Options To view or change Javadoc and standard doclet options: 1. Choose Tools→Global Options... from the main menu to open the Global Options window. 2. Select the Internal Javadoc or Standard Doclet node. 10.9.9.5 Changing Documentation Directories To change the directory for generated documentation: 1. Choose Tools→Global Options... from the main menu and select the Documentation→Standard Doclet node in the Global Options window. 2. Select the Destination property and change the directory manually or click the ... button that appears to change it using the File Chooser. 11.0 Bug Fixes The following sections list the bugs that were fixed before and after the first customer ship (FCS) release of Forte for Java. 11.0.1 Pre-Release Bug Fixes • After clicking the Tools→Tools submenu pull-right, moving mouse over the pull-right causes exception; menu cannot be displayed with the mouse. • Console windows appears for executed subprocesses when using the forte4jw.exe launcher. • • • • • Fixed several things which could cause “Error saving workspaces.” • • • • • Debugger does not stop on class prepare or unload. IDE freezes when opening a new project. Empty, gray editor window appears and can not be closed. Focus between explorer and editor does not transfer correctly. Remote Method Invocation (RMI) debugger settings do not use correct path separators. JSP engine does not report error positions for compilation errors. Exceptions occur during internal compilation. Using CTRL-F4 repeatedly to close Editor panes only works for the first pane. VisualCafe project import fails to parse the CLASSPATH in sc.ini. SUN MICROSYSTEMS, INC. 28 of 35 Performance and Tuning Recommendations 11.0.2 Post-Release Bug Fixes • Tools menu exception: Regression fixed. A pre-release bug fix included a fix to ensure that popup menus are kept on the screen. A merging mistake accidently backed out the fix for another menu bug. This is a bug with the Tools menu; the Tools submenu throws an exception. This fix for the Tools problem has been reapplied. • Deletion of actual files from the Project pane disabled. It is no longer possible to delete *files* from the project tab in Explorer; you can still remove links to folders and files. • Parser bug fix. Copying files with anonymous inner classes in the constructor is fixed. • Parsing compiler output. When you have two mounted filesystems and the name of one is a subset of the other, like W:\src and W:\src_foo, compiler errors under the shorter name were not being recognized, so you could not click on them to navigate to the sources in question. 12.0 Performance and Tuning Recommendations 12.1 Running Forte for Java with 64 MB of Memory Set the initial heap size lower than the default. Open your startup script (forte4j.bat or forte4j.sh) in a text editor and look for the Java execution line. One of the parameters on this line should look something like -Xmx128m. Change this parameter to -Xmx64m, save the file, and restart Forte for Java. 12.2 Java Software Development Kit 1.3 Release Candidate Use the Java SDK 1.3 — it’s both smaller and faster. The Java SDK 1.3 is available for Windows from http://java.sun.com/products/jdk/1.3/ download-windows.html 12.3 Virtual Memory (Windows Only) Make sure your virtual memory settings (in Control Panel→System→Performance) are at least double the amount of physical memory. 12.4 Swap File (Windows Only) Set your initial swap file size to be very large so time is not wasted growing it later. 12.4.1 Windows NT/2000 From your Start Menu, choose Settings→Control Panel→System, and select the Performance tab. Click Change in the section labeled “Virtual Memory.” This displays a list of drives in the system, and fields for Initial Size and Maximum Size. Set the initial size to something like 256 MB (if available) and click OK. SUN MICROSYSTEMS, INC. 29 of 35 Troubleshooting 12.4.2 Windows 95/98 From the Start Menu, choose Control Panel→System→Performance. Click the button labeled “Virtual Memory.” Click the radio button labeled Let Windows manage and set the paging file size in a similar manner. 12.5 Windows NT File System Partitions Make sure that your swap file is on an Windows NT files system (NTFS) partition, preferably with a large cluster size. Access should be quicker and NTFS is better about fragmentation. When files are swapping, system performance will be improved. 12.6 Color Depth Decrease the color depth of your display. Note however, that using 256 colors on Windows can cause some problems with redraws. 12.7 Network Drives Install the IDE and the SDK on local drives rather than network drives. For the complete frequently asked questions list (FAQ), see: http://www.sun.com/forte/ffj/ce/faq.html 13.0 Troubleshooting The best sources of Forte for Java troubleshooting information are the User’s Guide and the internet based support resources. It is strongly recommended that you know both thoroughly. The User’s Guide is accessed through: Help menu→Documentation. For internet resources see the main support page at: http://www.sun.com/forte/ffj/ce/support.html For each topic, read the text, follow each link in the text, and select the links in the shaded area on the left margin. 13.1 Installation and Configuration “Gotchas” 13.1.1 Web Resources - Installation • Installation Guide http://www.sun.com/forte/ffj/ce/documentation/install.html • Installation FAQ http://www.sun.com/forte/ffj/ce/install_faq.html SUN MICROSYSTEMS, INC. 30 of 35 Troubleshooting 13.1.2 Before Installation Be sure the hardware is adequate. The IDE will run with the minimum configuration, but you may be dissatisfied with the performance. The current recommendations are as follows: • Windows - Pentium processor, 300 Mhz, 128 MB memory • Solaris - UltraSPARC 5, 333 Mhz, 256 MB memory • Linux - not specified, but generally needs more memory than Windows Be sure the latest Java SDK is installed and running correctly. The IDE requires the Java SDK 1.2 or later to install and run. Be sure the OS has the latest version and all available patches. Many issues first reported as IDE problems turned out to be problems between the SDK and the OS. 13.1.3 Initial Installation The entire installation is contained in the forte_ce_1_0.class file. The operating system specific installation files (forte_ce_1_0.exe, forte_ce_1_0.sh, and ForteCE-FCS-1_0.noarch.rpm) are simply executable wrappers around the class file. Usually the operating system-specific executable is easiest to use and runs smoothly. Start with this. If it will not execute, download the class file and use Java to execute it. 13.1.4 Uninstall A normal installation puts an operating system-specific uninstall file in the installation directory. Use the normal uninstall process for the operating system. It will uninstall most of the IDE, but will not delete files that have been added or modified. This allows the user an opportunity to make backup copies of those files. To uninstall completely often requires the user to manually delete the remaining files and directories. It may be necessary to change some file permissions before deleting them. 13.1.5 Reinstall You cannot reinstall the IDE over an existing installation. Either install into a new directory, or uninstall and completely remove the existing installation. You cannot reinstall to “refresh” a corrupted installation. 13.1.6 Updates The update process uses an internet connection to check for update patches to any installed modules. Your can trigger the process manually or automatic reminders can be scheduled. Be sure your computer can connect to the internet before checking for updates. 13.1.7 Backing Out Updates The update process does not have a rollback feature. It can be done manually, but it is not guaranteed to work every time. Look in the FORTE_HOME/update/backup directory for the previous versions of updated jar files. To back out an update, move the desired jar file or files to the corresponding live location. This may not work because the interdependencies among jar files may not be resolved. SUN MICROSYSTEMS, INC. 31 of 35 Troubleshooting 13.1.8 Configuration The IDE is highly customizable, with extensive runtime configuration options. Very little configuration is required during installation. However, there are a few points to consider. 13.1.8.1 Installation Directory Use the default forte4j unless you need multiple installations. If the directory already exists, then it must be empty. 13.1.8.2 Java Virtual Machine If multiple SDKs are installed, verify that the correct version was selected during the installation process, or specify it manually when using the IDE. Be sure that the JVM selected is part of a complete SDK and not limited to a JRE. 13.1.8.3 Update Center If you use a proxy host, be sure the Update Center is configured to use it. Internet Edition modules are available for testing under the Early Access program. To install them the Update Center Registration Number must be filled in correctly. Currently, it is 12344321. If you want to limit the installation to Community Edition modules only, leave the Update Center Registration Number blank. 13.2 Common User/System Administrator Errors Except as noted in Section 9.0,“Administering Forte for Java,” Forte for Java is designed for individual use by Java developers. There is no distinction between users and system administrators. See the following section to resolve common user and system administrator errors. 13.3 Common User Questions User support is internet based and relies on the following resources. 13.3.1 Frequently Asked Questions The FAQ is available at: http://www.sun.com/forte/ffj/ce/faq.html 13.3.2 Newsgroups and Forums Forte for Java newsgroups support communication and mutual assistance throughout the worldwide user community. The forums mirror the newsgroups and are intended to provide access when firewalls filter out newsgroups. Read the newsgroups regularly to keep up with current issues. • Forums http://cgi.netbeans.com/cgi-bin/webx SUN MICROSYSTEMS, INC. 32 of 35 Troubleshooting • Newsgroups news://news.netbeans.com Currently, the following areas of specializations are supported: • • • • • • 13.3.3 forte.java.announce forte.java.debugging forte.java.discussion forte.java.editor forte.java.formeditor forte.java.thirdparty Early Access Program Pre-release versions of some modules are available through the Early Access Program (EAP) without charge and without guaranteed support. Users who participate in the program are encouraged to join the EAP mailing list. This facilitates mutual assistance, and is the primary medium for assistance from Sun engineers with EAP modules. It functions like a newsgroup, but is email based. Some people use the EAP list for support with core IDE issues, not just EAP issues. Direct users to the newsgroups and forums, where the answers can be shared with other users. 13.3.4 Paid Support Sun Microsystems, Inc. offers fee-based support for users who require a guaranteed response within a specific time frame. For information on this opportunity, see: http://www.sun.com/developers/support 13.4 Error Message Guide Forte for Java does not have an Error Message Guide. Users can configure the IDE to use any number of language translators as external compilers, which have their own error message guides. The IDE uses popup dialogs and messages whenever it needs user input. These are self-explanatory, eliminating the need for a comprehensive guide. 13.5 Known Bugs and Their Workarounds At this time and until further notice, all bug fixes will be announced via the Early Access Program and software solutions delivered to customers through the Update Center. 13.5.1 Forte for Java Bug Parade The following web site details the known bugs in the Java SDK that affect Forte for Java. Workarounds are included in the listing: http://eap.netbeans.com/bugs/jdc.html 13.5.2 Sun’s Bug Parade The following web site details all known bugs in the Java SDK. Workarounds are included in the listing: http://developer.java.sun.com/developer/bugParade/index.html SUN MICROSYSTEMS, INC. 33 of 35 Reference Information 13.5.3 Known Bugs The following web site provides details on the open bugs, closed bugs, and requests for enhancement (RFE) related specifically to Forte for Java: http://eap.netbeans.com/bugs/index.html 13.5.4 Bug Report Form When a user believes that their issue is a new bug or RFE, they should use the following web site to report the issue: http://www.sun.com/forte/ffj/ce/bug_submit.html Note: this is for bugs and RFEs only, not for support requests. Users should try other support options and search known bugs before logging a new bug. 13.5.5 Internal Bug Report The following web site is for internal use only. Support engineers may use it to log verified bug and enhancement requests. The product team will review the submissions. http://eap.netbeans.com/internal_bug_report.html 14.0 Reference Information 14.1 Technical Documentation The web page to reference the documentation for the product is: http://www.sun.com/forte/ffj/ce/documentation/index.html The following documentation is available from the above web page by clicking the links on that web page: • Installation Guide • System Requirements • Installation Procedures • Command Line Switches • Installation Directories • QuickStart Guide • User’s Guide • Optimization tips • Using Forte for Java • API Overview • Customizing Forte for Java • Supported Java Virtual Machines • Using AutoUpdate For an overview of the product and details about the modules provided in Forte for Java, see the following URL: http://www.sun.com/forte/ffj/ce/overview.html SUN MICROSYSTEMS, INC. 34 of 35 Reference Information Note: The tutorial and documentation is provided when you download the product from the download web page. 14.2 Additional References 14.2.1 Frequently Asked Questions See the following URL for a list of FAQs: http://www.sun.com/forte/ffj/ce/faq.html Choose a category from this web page to see a list of frequently asked questions for that topic. For example: • Product Info — General questions like: “What is Forte for Java?” • Installation — Problems or questions relating to the installation of Forte for Java. • Virtual Machines — Common questions regarding Java Virtual Machines and Forte for Java. • Performance Tips —A collection of tips for improving the performance of Forte for Java on your system. • Miscellaneous — Other frequently asked questions which do not fall into any of the above categories. 14.2.2 White Papers See the following URL for a white paper, Forte for Java, Community Edition: Opening the Door to Integrated Development: http://www.sun.com/forte/ffj/ce/whitepapers/index.html The white paper provides in-depth technical information to help you learn more about the advantages of developing Java applications with the Community Edition of Forte for Java. This whitepaper can be saved in your system in either Portable Document Format (PDF) or PostScript™ format. SUN MICROSYSTEMS, INC. 35 of 35