Oracle9i Jdeveloper User's Guide

4683
Oracle9i Developer Suite Oracle9i JDeveloper User’s Guide Release 9.0.2 Production for Windows, Solaris, Linux, HP-UX May, 2002 Part No. A97276-01 This book contains the Help topics including conceptual, procedural, and F1 Help in Oracle9i JDeveloper Release 9.0.2 Production available on Oracle Technology Network (OTN).

Transcript of Oracle9i Jdeveloper User's Guide

Oracle9i Developer Suite

Oracle9i JDeveloper Users Guide

Release 9.0.2 Production for Windows, Solaris, Linux, HP-UX

May, 2002 Part No. A97276-01

This book contains the Help topics including conceptual, procedural, and F1 Help in Oracle9i JDeveloper Release 9.0.2 Production available on Oracle Technology Network (OTN).

Oracle9i JDeveloper Users Guide, Release 9.0.2 Part No. A97276-01 Copyright 1996, 2002, Oracle Corporation. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent and other intellectual and industrial property laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation. If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on behalf of the U.S. Government, the following notice is applicable: Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication, and disclosure of the Programs, including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Programs. Oracle is a registered trademark. Oracle8i, Oracle9i, PL/SQL, JInitiator, and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. Other names may be trademarks of their respective owners. Copyright 1999, 2000 The Apache Software Foundation. All rights reserved. This product includes software developed by the Apache Software Foundation (http://www.apache.org). SOAP is provided "AS IS". Copyright 2000 The Apache Software Foundation. All rights reserved. This product includes software developed by the Apache Software Foundation (http://www.apache.org). BATIK is provided "AS IS". Portions of this software and documentation copyright 2001Three D Graphics.

Send Us Your CommentsOracle9i JDeveloper Users Guide, Release 9.0.2 for Windows, Solaris, Linux, HP-UXPart No. A97276-01

Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this document. Your input is an important part of the information used for revision.

Did you find any errors? Is the information clearly presented? Do you need more information? If so, where? Are the examples correct? Do you need more examples? What features did you like most?

If you find any errors or have any other suggestions for improvement, please indicate the document title and part number, and the chapter, section, and page number (if available). You can send comments to us in the following ways:

Post a message on the Oracle Technology Network - Oracle9i JDeveloper Forum at: http://otn.oracle.com/products/jdev/content.html Note: Click the Discussion Forum link FAX: 650-506-7433 Attn: Oracle9i JDeveloper User Assistance Postal service: Oracle Corporation Oracle9i JDeveloper User Assistance 500 Oracle Parkway, 2OP12 Redwood Shores, CA 94065 United States

If you would like a reply, please give your name, address, telephone number, and (optionally) electronic mail address.

Sofware-related QuestionsIf you have problems with the software, contact your local Oracle Support Services representative or if you prefer, post a message on the Oracle Technology Network - Oracle9i JDeveloper Forum at:

http://otn.oracle.com/products/jdev/content.html Note: Click the Discussion Forum link

iii

iv

PrefaceThis Adobe PDF document contains the entire set of Help topics in the Oracle9i JDeveloper Release 9.0.2 online Help system. These topics include conceptual and procedural help as well as the F1 Help (context-sensitive Help). When running JDeveloper, you can access these topics directly by choosing the Help | Help Topics menu option or by pressing the Help button on the dialog or winodw or the F1 key anywhere in the user interface. The main purpose of this document is to facilitate the printing of multiple Help topics using Adobe Acrobat. As this document is quite lengthy, you can choose to print only the desired range of pages.

Note:

To view this PDF document, you can download a free copy of Adobe Acrobat Reader from http://www.adobe.com/. Although you can search for a word(s) in Adobe Acrobat, excellent full-text search capabilities are available within JDevelopers Help system. For more information, see "How to Use the Online Help." This book is not an orderable part and therefore is not available for purchase from Oracle Store.

Intended AudienceThis document is intended for application developers interested in using JDeveloper to create Java and Java2 Enterprise Edition (J2EE) applications with end-to-end support for developing, debugging, and deploying e-business applications. Users should be familiar with general Web technology, HTML, and some Java. Oracle9i JDeveloper is certified on Windows, Solaris, Linux, and HP-UX.

v

JDeveloper Book StructureThis PDF document and the bookmarks (left frame) are structured to closely mirror the book order presented in the JDeveloper Online Help Table of Contents. The conceptual and procedural help topics are presented first followed by the F1 Help topics. The following JDeveloper books are not available in PDF format:

UIX Developers Guide UIX Element Reference Developing Help With Oracle Help for Java All Javadocs provided with JDeveloper Oracle Business Intelligence (BI beans)

JDeveloper Conceptual and Task HelpThe JDeveloper Conceptual and Task Help topics are presented in the following book order: 1. Welcome to Oracle9i JDeveloper This book contains information about new features, migration, copyright, and contact information. 2. Getting Started with JDeveloper This book contains information about everything you need to know to get started with JDeveloper workspaces and projects, configuring database connections, and how to customize the IDE. 3. Tutorials This book contains a number of helpful tutorials, highlighting the various JDeveloper features and capabilities. For example, you can learn how to build a simple Java application, model Java classes, develop a Business Components for Java (BC4J) application, create JSPs with data tags, create and use Web services, and much more. 4. Developing Web Applications (J2EE Web Modules) This book covers working with servlets, working with JSP pages, working with JSP tag libraries, working with data bound BC4J JSP pages, working with UIX XML and UIX JSP pages, working with XSQL servlets, and developing using UIX technologies. 5. Working with XML Files

This book covers using the JDeveloper XML editor to edit XML languages including UIX, UIT, XSQL, XSL, XHTML and WSDL files.6. Working with UIX XML and UIX JSP Pages This book covers developing, editing, and viewing UIX XML and UIX JSP pages.

vi

7. Working with XSQL Servlets This book covers XSQL tags, XSQL servlet clients, and XSQL tag reference. 8. Developing Java GUI Clients This book covers JDevelopers user interface design tools, layout managers, working with containers and components, events, applets, JClient applications, and Java Web Start. 9. Testing and Optimizing Your Code This book covers compiling, running, debugging your Java applications. In addition, JDeveloper features such as CodeCoaching and profiling address writing more efficient Java programs. 10. Developing JavaBeans This book covers creating and customizing JavaBeans and creating a Pluggable Java Component (PJC). 11. Developing Business Components This book covers the Business Components for Java (BC4J) framework including new features, creating BC4J applications and BC4J clients, using the API, customization, extending BC4J, developing BC4J for foreign datasources, using XML with BC4J. In addition, the BC4J F1 Help and glossary are provided. 12. UML Modeling This book covers UML modeling basics, diagram layouts and elements, modeling Java classes, reverse engineering, modeling business components, modeling activities for E-business integration, and deploying integration files. 13. Developing Enterprise JavaBeans This book covers developing EJBs with JDeveloper, EJB generated files, EJB import and migration, and several helpful EJB Walkthroughs. 14. Packaging and Deploying This book covers the packaging and deployment of J2EE JAR files including Web Archive (WAR), EJB JAR, and Enterprise Archive (EAR) to Oracle9iAS Containers for J2EE (OC4J), BEA WebLogic, Apache Tomcat, and VisiBroker. Also, covered are deployments to the Oracle9i database, BC4J deployments, and Web services deployments. 15. Using SQL in Java Programs This book covers embedding SQL in Java programs with JDBC, accessing Oracle objects and PL/SQL packages using Java and JPublisher, and improving application performance with Java stored procedures. 16. Browsing the Database This book covers browsing schemas through JDBC connections, using the SQL worksheet, and launching SQL*Plus.

vii

17. Using Source Control Support This book covers using Oracle9i Software Configuration Manager (SCM) support, branching with Oracle9i SCM, using Rational ClearCase with JDeveloper, using Concurrent Versions System (CVS) with JDeveloper, and using your own source control system. 18. Web Services This book covers Web services concepts including WSDL and SOAP, getting started with Web services, developing Web services, and using Web services. 19. Using WebDAV Support This book covers creating a WebDAV connection, managing files and folders on a WebDAV connection, and locking and unlocking files on a WebDAV connection. 20. Extending JDeveloper Using the Addin API This book covers the JDeveloper Integrated Development Environment (IDE), creating a Wizard, defining document types, creating an editor, creating an explorer, defining a command, and other extension types.

viii

JDeveloper F1 HelpF1 Help topics include descriptions for each field and UI element in a JDeveloper dialog box or window including the available options. The F1 topics for each book are typically presented in alphabetical order. The JDeveloper F1 Help topics are presented in the following book order: 1. Getting Started F1 Help Information about the New Gallery, IDE Preferences dialog, UI editor, and general IDE dialogs and windows are covered. 2. JClient F1 Help Information about the JClient Data Model Definition Wizard, JClient Graph Wizard, JClient Form Wizard, JClient Java Web Start Wizard, and various JClient dialogs are covered. 3. Web Application F1 Help Information about BC4J Web Application Wizard, BC4J Configuration Manager, Data Tag Wizard, Web Module Wizard, Servlet Wizard, Web Application 2.2 Deployment Descriptor settings, Web Bean Editor, and Web Object Manager are covered. 4. JSP Tag F1 Help Information about Web beans, JSP tags, and JBO data tags are covered. 5. JSP and JSP UIX General F1 Help Information about taglib deployment descriptors, JSP tags, XML editor, UIX JSP Wizard, UIX Wizard, and the Java Web Start Wizard are covered. 6. UIX XML and UIX JSP Pages F1 Help Information about bc4juix, uix, and xsql tags are covered. 7. Compiling and Debugging F1 Help Information about all compiling, debugging, and running dialogs and windows including those related to the breakpoints, smart data, watches, inspector, project settings, remote debugging, tracing, and Tools Preferences are covered. 8. CodeCoach and Profiling F1 Help Information about all CodeCoach and Profiling project settings and related dialogs and windows are covered. 9. Developing JavaBeans F1 Help Information about the PJC Class Editor, BeanInfo Class Editor, and related bean dialogs and windows are covered. 10. UML Modeling F1 Help Information about the Activity dialog, E-Business Integration Wizard, Swimlane properties, and related dialogs and windows are covered.

ix

11. Enterprise JavaBeans F1 Help Information about the EJB JAR deployment descriptors (ejb-jar.xml), EJB Class Editor, and the EJB Wizard are covered. 12. Packaging and Deploying F1 Help Information about the Business Components Deployment Wizard, Application Server Connection Wizard, deployment profile settings, J2EE Client (application-client.xml) and Web Module (web.xml) deployment descriptors, OC4J EJB deployment descriptors (orion-ejb-jar.xml), deployment preferences, preview deployment, and all deployment-related dialogs and windows are covered. 13. SQL in Java Programs F1 Help Information about SQLJ class, project properties, and viewer dialogs and windows are covered. 14. Source Control F1 Help Information about Oracle9i SCM Merge Wizard, ClearCase, CVS, Oracle9i SCM Connection Wizard, Oracle9i SCM Workarea Wizard, and related dialogs and windows are covered. 15. Web Services F1 Help Information about Web Service Stub/Skeleton Wizard, Web Service Publishing Wizard, and SOAP Server Connection Wizard are covered. 16. WebDAV F1 Help Information about WebDAV connection, locks, and other related dialogs and windows are covered.

x

Welcome to JDeveloper - Overviewq

Welcome to Oracle9i JDeveloper r Copyright and Other Legal Noticesr

Contact Us How to Use the Online Help s Help Navigator Windows

r

Help System Menus

r

JDeveloper Accessibility Information Navigating JDeveloper with Keystrokes Ways to Migrate Projects to Oracle9i JDeveloper s Migrating JDeveloper 3.2.x Projects to Oracle9i JDeveloper s Importing JDeveloper 3.2.x Connections and Files into Oracle9i JDevelopers

r

r

Updating JDeveloper 3.2.x Business Components Projects for Oracle9i JDeveloper Migrating XSQL Projects from JDeveloper 3.2.x to Oracle9i JDeveloper Creating Oracle9i JDeveloper Deployment Profiles for Migrated JDeveloper 3.2.x Projects

s

s

s

Migrating Oracle9i JDeveloper Beta Projects to Oracle9i JDeveloper Production s Updating Oracle9i JDeveloper Beta JSP Projects Migrating Oracle9i JDeveloper Release Candidate Projects to Oracle9i JDeveloper Production s About Changes to CMT Service Beans Migrating Projects Between Different Installations of Oracle9i JDeveloper

s

s

1-1

Welcome to Oracle9i JDeveloper!Oracle9i JDeveloper is a J2EE development environment with end-to-end support for developing, debugging, and deploying e-business applications. JDeveloper empowers users with highly productive tools, such as the industry's fastest Java debugger, a new profiler, and the innovative CodeCoach tool for code performance analysis and improvement. To take J2EE application development to a higher level of productivity, JDeveloper offers Business Components for Java (BC4J), a standards-based, server-side framework for creating scalable, high-performance Internet applications. The framework provides design-time facilities and runtime services to drastically simplify the task of building and reusing business logic. For more information, please see any of the following:q

New Features in Oracle9i JDeveloper Ways to Migrate Projects to Oracle9i JDeveloper How to Use the Online Help JDeveloper9i Tutorials Copyright and Other Legal Notices Contact Us

q

q

q

q

q

Additional information is available at the Oracle Technology Network (OTN) OTN is your free definitive source for Oracle technical information on developing for the Internet platform. You will be part of an online community with access to free software (including JDeveloper addins), OTN-sponsored Internet developer conferences, and discussion groups on up-to-date Oracle technology. If you are not already a member, please sign up for a free membership at http://otn.oracle.com/free/ The most recent information regarding Oracle9i JDeveloper, including whitepapers, addins, and product updates, is available at OTN at http://otn.oracle.com/products/jdev/

1-2

Copyright and Other Legal NoticesCopyright Notice "Copyright 1997, 2002, Oracle Corporation. All rights reserved." "Copyright 1999, 2000 The Apache Software Foundation. All rights reserved. This product includes software developed by the Apache Software Foundation (http://www.apache.org). SOAP is provided "AS IS". " "Copyright 2000 The Apache Software Foundation. All rights reserved. This product includes software developed by the Apache Software Foundation (http://www.apache.org). BATIK is provided "AS IS". " "Portions of this software and documentation copyright 2001Three D Graphics." License Restrictions & Warranty Disclaimer "The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent and other intellectual and industrial property laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation." Restricted Rights Notice

"If the Programs are delivered to the US Government or anyone licensing or using the Programs on behalf of the US Government, the following notice is applicable:" "RESTRICTED RIGHTS NOTICE Programs delivered subject to the DOD FAR Supplement are 'commercial computer software' and use, duplication and disclosure of the Programs including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are 'restricted computer software' and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065."

Hazardous Applications 1-3

"The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be licensee's responsibility to take all appropriate fail-safe, back up, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Programs."

Trademark Notice "Oracle, Oracle9i, Oracle8i, PL/SQL, and JInitiator are trademarks or registered trademarks of Oracle Corporation. Other names may be trademarks of their respective owners." Documentation Accessibility Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle Corporation is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/. Accessibility of Code Examples in Documentation JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace. Accessibility of Links to External Web Sites in Documentation This documentation may contain links to Web sites of other companies or organizations that Oracle Corporation does not own or control. Oracle Corporation neither evaluates nor makes any representations regarding the accessibility of these Web sites. UIX Tag Libraries Oracle has provided certain Java class definitions within the UIX tag library in JDeveloper which may be used in accordance with the Oracle program license that accompanied JDeveloper ("Java Classes"). The Java Classes may be modified in future releases of JDeveloper, and future versions of the Java Classes may not be backwardly compatible.

1-4

Contact UsOracle Corporation welcomes your comments and suggestions on the quality and usefulness of the Oracle9i JDeveloper Beta online documentation. Your input is an important part of the information used for revisions. We would like to know:q q q q q

Did you find any errors? Is the information clearly presented? Do you need more information? If so, where? Are the examples correct? Do you need more examples? What features did you like most about the guides?

You can send your comments by email at [email protected] In your email, please indicate the following information:q q

Topic title (for example, "Starting JDeveloper") Table of contents path (for example, "Working with JDeveloper/Introduction")

If you have problems with the software, please contact Oracle Support Services. Paste the following URL in your web browser: www.oracle.com/support

1-5

How to Use the Online HelpThe online help viewer has two windows and a menu bar: Navigator window Displays the table of contents, index, and search panel, depending on which tab you select. Topic window Displays the help topic that you select from the table of contents. It is the window that contains the topic that you are reading right now. Menus The menu commands available on the menu bar will vary depending on which window you are viewing.

You can also use the online help in hosted or local mode. Hosted mode allows you to read the documentation over the World Wide Web. The default option is to use the Oracle Technology Network for hosted documentation, but you can also host the documentation on a local server. Instructions for setting up your own documentation host are available in the installation guide. Note: We only suggest using hosted documentation when you have a broadband connection. When you start the help system in hosted mode, approximately 4 MB of information must be downloaded before the help system will start. Using hosted documentation 1. In JDeveloper, in the Tools menu, select Preferences . 2. In the Preferences dialog, click Documentation. 3. Click Use Hosted Documentation. By default, the OTN host is selected, but you can set it ot any URL. If you need to reset it to OTN, enter http://otn.oracle.com/hosted_doc/jdev/jdeveloper/jdeveloper.hs

Using local documentation 1. In JDeveloper, in the Tools menu, select Preferences . 2. In the Preferences dialog, click Documentation. 3. Click Use Local Documentation. If you have a default installation, you do not have to set1-6

the path to the local documentation.

1-7

Help Navigator WindowThe navigator window has three tabs: Contents Displays a list of all books and topics in the online help. To display a topic in the topic window, double-click a topic title in the table of contents. If you want to open another topic in a separate window, right click on the topic. Index Displays an alphabetical list of index entries much like the index of a book. To use the index, scroll through the index list and click on an index entry, or type a word that is related to the topic you want to view. A list of topics related to the word you select is displayed in the lower pane of the window. Double click a topic in the list to display its contents in the topic window. Search Allows you to search for a specific word in the entire online help system. Type a word related to the topic you want to view, and click the Search button. A list of topics related to that word is displayed in the lower pane of the window. Double click a topic in the list to display its contents in the topic window.

The toolbar at the top of this window has buttons to:Display a topic that you select in the table of contents, index, or search list in the topic window. Display a topic that you select in the table of contents, index, or search list in a new topic window. Launch the search window.

1-8

Help System MenusThe help system menus have the following functions:File Display Display in New Window Print Tree Print Topic Print Topics Close Exit Comments Enabled when a topic is selected in the tree; displays the topic in the docked topic window. Keyboard: Enter Enabled when a topic is selected in the tree; displays the topic in a new topic window. Keyboard: Ctrl N Prints the contents tree as it currently appears. Keyboard: Ctrl X Prints the topic in the docked topic window. Keyboard: Ctrl P Prints the selected topic and all the topics contained within it in the table of contents. Closes the current window Closes the help system viewer.

View Contents Index Go Back

Comments Switches the view of the Navigator to the Contents page Switches the view of the Navigator to the Index page Comments Enabled when a second topic is displayed in the docked topic window; disabled when the user goes back to the first topic Enabled when a user goes back to a previous topic; stays enabled if the user continues to go back to previous topics; disabled if the user goes forward to the newest topic Comments Displays the Navigator; when the Navigator is already running, choosing Navigator brings it to the front Undocks the topic window and the Navigator, returning them to their default states Enabled when the topic window and the Navigator are undocked Comments Displays the About JDeveloper dialog box

Forward

Tools Navigator Undock Dock Help About

1-9

JDeveloper Accessibility InformationIt is our goal to make Oracle Products, Services, and supporting documentation accessible to the disabled community. JDeveloper supports accessibility features. To make the best use of our accessibility features, Oracle Corporation recommends the following software configuration:q q q q q

Windows NT 4.0 (with Service Pack 6) or Windows 2000 Sun Java Access Bridge 1.0.2 JAWS 3.70.87 Microsoft Internet Explorer 5.5 JDK 1.3.1

For additional accessibility information for Oracle products, paste the following URL in your web browser: www.oracle.com/accessibility For the latest configuration information or for information on addressing accessibility and assistive technology issues, see the Oracle Accessibility FAQ at: www.oracle.com/accessibility/faq.html This help topic includes the following information that pertains to JDeveloper accessibility:q

Using a Screen Reader and Java Access Bridge with JDeveloper JDeveloper Features that Support Accessibility Recommendations for Customizing JDeveloper Highly Visual Features of JDeveloper

q

q

q

Using a Screen Reader and Java Access Bridge with JDeveloperIn order for assistive technologies, like screen readers, to work with Java-based applications and applets, the Windows-based computer must also have Sun's Java Access Bridge installed, as described below. Please refer to the Oracle9i Developer Suite Installation Guide found in the root directory on the Oracle9i Developer Suite CD, in /doc/core902/install/toc.htm for information about installing Oracle9iDS. Please refer to the Preface in the documentation found on the1-10

Oracle9iDS CD, in /doc/core902/install/pref.htm for additional information about accessibility.Please refer to the following information to set up a screen reader and Java Access Bridge.

1. Install the screen reader, if it is not already installed. Refer to the documentation for your screen reader for more information about installation. 2. Install JDeveloper. Refer to the Installation Guide found in /doc/core902/install/toc.htm for more information about JDeveloper installation. 3. Download Java Access Bridge 1.0.2. The file you will download is accessbridge1_0_2.zip. It is available from http://java.sun.com/products/accessbridge">http://java.sun.com/products/accessbridge. Refer to the Java Access Bridge documentation available from this web site for more information about installation and the Java Access Bridge. 4. After downloading the file, extract the contents to a folder; for example, accessbridge_home. 5. Install Java Access Bridge by running Install.exe from the \installer folder. 6. Confirm that you want to install the Java Access Bridge into each of the Java virtual machines displayed in the dialog. Click OK when you see the Installation Completed message. 7. Confirm that two jar files: access-bridge.jar and jaccess-1_3.jar were added to the folder \jdk\jre\lib\ext during the install. If necessary, copy them from \installer\installerFiles to \jdk\jre\lib\ext. 8. Confirm that two DLL files: JavaAccessBridge.dll and WindowsAccessBridge.dll were added to the folder \jdk\jre\lib\ext. If necessary, copy them from \installer\installerFiles to \jdk\jre\lib\ext. 9. Add the files listed above, JavaAccessBridge.dll and WindowsAccessBridge.dll, to the Winnt\System32 directory, as they must be in the system path in order to work with JDeveloper.1-11

10. Confirm that the PATH environment variable has been updated to include the directory where the DLL files were installed, \jdk\jre\lib\ext. 11. Confirm that the file \jdk\jre\lib\accessibility.properties includes the following line: assistive_technologies=com.sun.java.accessibility.AccessBridge If necessary, copy the file accessibility.properties from \installer\installerFiles to \jdk\jre\lib. 12. Modify the file jdev.conf located in the folder \jdev\bin to uncomment the AddVMOption line as shown below: # # Prepend patches to the bootclasspath. Currently, rtpatch.jar contains a # patch that fixes the javax.swing.JTree accessibility problems. # Uncomment the line below if you need to run JDeveloper under JAWS. # AddVMOption -Xbootclasspath/p:../../jdk/jre/lib/patches/rtpatch.jar 13. It is also necessary to use Hotspot instead of OJVM to run JDeveloper. To do this, set the SetJavaVM line in the jdev.conf file as follows: SetJavaVM hotspot 14. Start your screen reader. 15. Start JDeveloper by running the file jdev.exe located in the folder \jdev\bin.

The steps above assume you are running Windows and using a Windows-based screen reader. A console window that contains error information (if any) will open first and then the main JDeveloper window will appear, once JDeveloper has started.

JDeveloper Features that Support AccessibilityThe following features in JDeveloper are designed to support accessibility:q

Keyboard Access

1-12

q

Screen Reader Readability Flexibility in Font and Color Choices No Audio Only Feedback No Dependency on Blinking Cursor and Animation Screen Magnifier Usability

q

q

q

q

Keyboard AccessJDeveloper features support keyboard access to JDeveloper functionality; a summary is provided below. The mnemonic keys used to open menus and choose commands are included in all procedural topics. Please refer to the following topics for a summary of how keys are assigned within JDeveloper and the lists of accelerator keys provided for commands:q

Navigating JDeveloper with Keystrokes Default Keymapping Classic Keymapping Emacs Keymapping Virtual C++ Keymapping

q

q

q

q

The following menu and toolbar functionality is provided through keyboard access:q q q q q

Users can navigate to and invoke all menu items All toolbar functions are accessible through menu items, including the Navigator toolbar All menus and menu items have unique and functioning mnemonic keys All context menus within the Navigator and Code Editor can be invoked Frequently used menu items have unique and functioning accelerator keys

The following functionality is available in JDeveloper IDE windows, which include the Navigator, Structure Pane, Code Editor, Property Inspector, Constraints, Profilers, Debugger windows, Help windows, Log window and BC4J Tester. Users can:q

Navigate between all open windows, to all nodes within a window or pane, and between tabs in a window Set focus in a window or pane1-13

q

q q q q

Invoke all controls within a window or pane, and perform basic operations Navigate and update properties in the Property Inspector Use Code Insight and Code Templates in the Code Editor Invoke context sensitive help topics, navigate to and open all help topics, and navigate between the Contents, Index and Search tabs Open, close, dock, undock, minimize, restore and maximize the applicable JDeveloper window

q

The following functionality is available in JDeveloper dialogs and wizards:q q q

Users can navigate to and invoke all controls within all wizards and dialogs The order in which the Tab key causes focus to flow is consistent and logical Mnemonic keys are provided for controls where appropriate

Navigation and controls are available with runtime applications, which include all runnable files that are produced with JDeveloper, including Java applications, HTML applications, applets, JSPs, Servlets, BC4J applications and JClient applications. With runtime applications, users can:q q

Navigate to all controls within all runtime applications Invoke all controls within all runtime applications

Screen Reader ReadabilityHere is a summary of JDeveloper's screen readability, when it is used with a screen reader. When used with menus and toolbars:q q q

All menus and menu items are read All toolbar items, including the Navigator toolbar items, are read The hint text on all Toolbar items is read

When used with JDeveloper IDE windows:q

All open windows are read

1-14

q q

All components within each window, including tabs, are read Status text at the bottom of the JDeveloper IDE, and within the Code Editor, is read

When used with dialogs and wizards:q q

All controls within all wizards and dialogs are read Hint text is read

When used with runtime applications:q

All controls within all runtime applications are read

Reading Text in a Multi-line Edit Field To have the text in a multi-line edit field read by a screen reader, you can select text by holding down the Shift key while moving the cursor either up or down with the Arrow keys, depending on the initial cursor position. For example, on the View Object reentrant wizard Query panel, the cursor is initially positioned at the end of the SQL statement, and you will need to use the Up Arrow key to select the text to be read

Flexibility in Font and Color ChoicesThe user interface in JDeveloper improves usability for people who are visually impaired by offering flexibility in color and font choices. The following font and color features are included:q q q

Users can specify both the font and the size in which the font displays for editors All features of the product have black text on a white or gray background Colored text, underlining or images are never used as the only method of conveying information

No Audio Only FeedbackIn JDeveloper, there is no situation in which the only feedback a user receives is audible feedback. All audible feedback is accompanied by a visual indicator. For example, a prompt accompanies the bell sound that occurs when an error or illegal action has taken place.

No Dependency on Blinking Cursor and Animation1-15

JDeveloper makes minimal use of a blinking cursor and animation:q

No features in JDeveloper use blinking indicators, with the exception of the cursor in the Code Editor No features rely on animated sequences

q

Screen Magnifier UsabilityThe JDeveloper user interface works well with screen magnifiers. All features of the product can be magnified by a screen magnifier.

Recommendations for Customizing JDeveloperJDeveloper provides a number of customization features that enable users to specify their requirements for keyboard usage, display attributes of the IDE, and timing where appropriate. All customization features are organized within the Preferences dialog. For maximum usability and to accommodate your needs, you should consider changing any of the following from the defaults to a more usable customized setting.q

Accelerators specified for menus, commands and actions Look and Feel of the IDE Font size and colors in editors Colors used for syntax highlighting in editors Display of line numbers in editors Timing that determines when Code Insight is invoked Column layout and types of information in the Debugger

q

q

q

q

q

q

Customizing the Accelerators KeysYou can add and change the default accelerator keys for JDeveloper in the Tools | Preferences | Accelerators panel. You can also load preset keymaps that you are accustomed to using. Please refer to the following topics for the procedure to modify the accelerator keys:q

Defining Custom Accelerators for the IDE Loading Preset Keymaps for the IDE

q

1-16

Changing the Look and Feel of the IDEYou can change the default look and feel for JDeveloper in the Tools | Preferences | Environment panel. The look and feel determines the display colors and shapes of objects like menus and buttons. Please refer to the following topic for the procedure to change the look and feel of the IDE:q

Changing the Look and Feel of the IDE

Customizing the Fonts in EditorsYou can change the font and font size that displays is editors in the Tools | Preferences | Editor | Fonts panel. Please refer to the following topic for the procedure to customize the fonts in editors:q

Setting Fonts for the Code Editor

Customizing the Syntax HighlightingYou can change the font style, as well as the foreground and background colors used in syntax highlighting within the code editor in the Tools | Preferences | Editor | Syntax Colors panel. Please refer to the following topic for the procedure to customize the syntax highlighting:q

Defining Syntax Highlighting for the Code Editor

Displaying Line Numbers in EditorsYou can display or hide line numbers in the Code Editor in the Tools | Preferences | Editor | Display panel. Please refer to the following topic for the procedure to display line numbers:q

Setting Display Options for the Code Editor

Changing the Timing for Code InsightYou can specify the number of seconds that Code Insight is delayed, or disable Code Insight in the Tools | Preferences | Editor | Code Insight panel. Please refer to the following topic for the1-17

procedure to change Code Insight defaults:q

Customizing Code Insight Options for the Code Editor

Specifying the Columns in the DebuggerYou can choose the columns and types of information that display in the Debugger in the Tools | Preferences | Debugger panels. Please refer to the following topic for the procedure to change Debugger options:q

Setting Preferences for the Debugger Windows

Highly Visual Features of JDeveloperJDeveloper includes two features that are highly visual, and these features have equivalent functionality that is available to people who are blind or visually impaired:q

The UI Editor. The Code Editor provides equivalent functionality, as the UI can be completely designed and coded in the Code Editor. The Component Palette. The Code Editor provides equivalent functionality, as elements and tags that can be selected from the Component Palette can also be entered in the Code Editor.

q

JDeveloper also includes two features that are entirely visual, and these features do not have equivalent functionality that is available to people who are blind or visually impaired. They also do not provide keyboard access. However, many properties of existing model elements can be set using dialogs, which are accessible from the Navigator.q q

The Class Modeler The Activity Modeler

1-18

Navigating JDeveloper with KeystrokesYou can accomplish any task in JDeveloper using the keyboard as you can using the mouse. The accelerators defined in the Java Look and Feel guidelines (listed at http://java.sun.com/products/jlf/ed1/dg/appendix.htm) provide the base set for JDeveloper. The various keymappings available in JDeveloper are then overlaid upon this base set. If the same accelerator exists in both the Look and Feel guidelines and the JDeveloper keymap, the JDeveloper keymap prevails. If an accelerator defined by the Look and Feel guidelines does not appear in a JDeveloper keymap, then it is the original Look and Feel definition that remains in effect when the keymap in question is enabled. At any given time, then, the accelerators enabled in JDeveloper depend upon the interaction of the currently enabled keymap with the Java Look and Feel guidelines. When you first open JDeveloper, the default keymap is enabled. You can change this keymap whenever you wish, and within each keymap, you can customize any of the accelerator assignments that you would like. Note that any customized accelerators you create in a keymap are not retained when another preexisting keymap is activated (or even if the same keymap is reloaded). To load preexisting keymaps, view current accelerator assignments within a keymap, and customize those assignments, you will need to open the Preferences dialog. To open the dialog, choose Tools | Preferences (or on the keyboard, press Alt+T+P) from the main menu and then, using the arrow keys in the lefthand pane, navigate to the Accelerators node. For details on working with the dialog, with the Accelerators page displayed, click Help (or on the keyboard press H).

Related topics Working with Keymaps in the IDE Classic Keymapping Default Keymapping Default CDE Keymapping Default KDE2 Keymapping Emacs Keymapping Visual C++ Keymapping

1-19

Ways to Migrate Projects to Oracle9i JDeveloperThese topics contain procedures for migrating projects to Oracle9i JDeveloper from other versions and installations of JDeveloper.q

Migrating JDeveloper 3.2.x Projects to Oracle9i JDeveloper Migrating Oracle9i JDeveloper Beta Projects to Oracle9i JDeveloper Production Migrating Oracle9i JDeveloper Release Candidate Projects to Oracle9i JDeveloper Production Migrating Projects Between Different Installations of Oracle9i JDeveloper

q

q

q

1-20

Migrating JDeveloper 3.2.x Projects to Oracle9i JDeveloperNote: If you have Enterprise JavaBeans you want to migrate from JDeveloper 3.2.3 to Oracle9i JDeveloper, see Migrating EJBs from 3.2.3 to 9i. Note: If you are migrating a DAC application, see About JClient Compatibility with DAC. Note: If you are migrating from JDeveloper 3.2.x on Windows NT to Oracle9i JDeveloper on Solaris, you must first migrate to Oracle9i JDeveloper on Windows NT and then migrate to Solaris. Otherwise, you can import JDeveloper 3.2.x projects into Oracle9i JDeveloper by following these steps.To migrate JDeveloper 3.2.x projects to Oracle9i JDeveloper:

1. Import JDeveloper 3.2.x connections and source files into Oracle9i JDeveloper. 2. Redefine any libraries you created in JDeveloper 3.2.x. 3. Update business components projects. 4. If you use JSPs with business components datatags, find all instances of the tag. Make sure the id attribute of this tag contains no periods, and change it if it does. For example, you could change to 5. If you have to change any tag id attributes, change the appid attributes of tags to match. 6. If you use a business components JSP with the tag, be aware that the functionality of this tag has changed. See About Changes to the RowsetNavigate Tag for more information. 7. If you use interMedia domains, change calls of the form1-21

domain.getLoader().setFileName(name); to domain.setContentSource(new OrdFileSource(name)); 8. Update XSQL projects. 9. If you use XML Messaging with Advanced Queuing, be aware that the AQ API has changed. See About Changes to the AQ API for more details. 10. If your project uses servlets (not including Business Components JSPs), add the Servlet RT or JSP RT library. 11. Test your projects. If you receive a JBO-26061: Error while opening JDBC connection and/or a JBO-30003: Error (failed to check out an application module), make sure your connection has Deploy Password selected in the connection wizard. 12. Recreate deployment profiles for your projects.

1-22

Importing JDeveloper 3.2.x Connections and Files into Oracle9i JDeveloper1. Open JDeveloper 3.2.x. 2. Choose Tools | Connections to open the Connections Manager. 3. Click Export to open the Export Connection Descriptors dialog. Export all the connections used by your project. If you need further assistance with this dialog, click Help. 4. Open your project. 5. Close all source views displaying source code from your project. 6. Choose File | Save All. 7. Choose Project | Project Properties. 8. Note the source directories (in the Source Root Directories field) and the HTML root (in the HTML Root Directory field). 9. Close JDeveloper 3.2.x. 10. Copy the source root directories and HTML root directory (from step 8) into your Oracle9i JDeveloper environment. Note: It is important to preserve the relative path from the source root directories to the HTML root. For example, suppose your source root directory is /oracle/JDev3.2.3/work/myprojects and your HTML root is /oracle/JDev3.2.3/html/myhtml. The relative path from the source root directory to the HTML root is ../../html/myhtml. Therefore, if you copy the source root directory to /oracle/JDev9i/importedsource, you must copy the HTML root directory to /oracle/html/myhtml to preserve this relative path. 11. If your projects reference any files outside of these directories, those files may need to be copied so that they have the same relative path to your source root directory. 12. Open Oracle9i JDeveloper. 13. In the Navigator, expand the Connections node. 14. Right-click the Database node and choose Import Connections. 15. In the Import Connection Descriptors dialog, click Browse. 16. Locate your JDeveloper 3.2.x connections in /bin. 17. Select the connections you want to import, and click OK. 18. Choose File | Open.1-23

19. Browse to /myprojects and open your workspace.

1-24

Updating JDeveloper 3.2.x Business Components Projects for Oracle9i JDeveloperBefore you complete this procedure, make sure you have imported your connections and source files into Oracle9i JDeveloper.To update business components projects for Oracle9i JDeveloper:

1. If you get a ClassCastException at runtime in your migrated project, you may have to make changes to your code. SequenceImpl.getData() is no longer castable to an Integer. Instead, you must cast it to a Long. 2. If you used dollar signs in your classnames, JDeveloper will confuse them with inner classes. For example, JDeveloper will confuse a class named Dom$Currency with an inner class Currency inside the class Dom. If you have dollar signs in your class names, change them. Section 3.8 of the Java Language Specification says that dollar signs are allowed in class names but recommends that they be used only in machine-generated code. Because the Java compiler uses the dollar sign in the machine-generated class files it produces to represent inner classes, using dollar signs in your own application class files is not advisable. 3. If your project uses the JBO Runtime library and the XML Parser Version 2 library, remove the XML Parser Version 2 Library. The XML Parser Version 2 library has been merged into the JBO Runtime library, and leaving both on your classpath could cause conflicts. 4. Choose Project | Build. 5. Create a deployment profile for your business components and deploy.

1-25

Migrating XSQL Projects from JDeveloper 3.2.x to Oracle9i JDeveloper1. Add the XML SQL Utility library to your project. 2. In the Navigator, select XSQLconfig.xml. 3. Choose File | Remove from IDE. 4. In your file system, copy /jdev/system/XSQLConfig.xml to your project source directory in Oracle9i JDeveloper. 5. Choose File | Open. 6. Navigate to the new copy of XSQLConfig.xml. 7. Select XSQLConfig.xml and click Open. 8. Add any specific code you added to XSQLConfig.xml in JDeveloper 3.2.x.

1-26

Creating Oracle9i JDeveloper Deployment Profiles for Migrated JDeveloper 3.2.x ProjectsOracle9i JDeveloper deployment profiles are different from JDeveloper 3.2.x profiles. The following table indicates the best migration choice for JDeveloper 3.2.x profiles. Note: Oracle9i JDeveloper will automatically create deployment profiles for web applications.JDeveloper 3.2.x Deployment Profile Corresponding Oracle9i JDeveloper Deployment Profile

Classes and Stored Procedures to Oracle8i Stored Procedures Java Classes to Oracle8i Web application CORBA Object to Oracle8i CORBA Object to VisiBroker Loadjava Oracle9i JDeveloper will automatically create a deployment profile. Not supported, but see Deploying a CORBA Server Object to VisiBroker CORBA Object to VisiBroker Not supported, but see Creating and Deploying a J2EE EJB Module to OC4J or Creating and Deploying a J2EE EJB Module to WebLogic. You can also manually deploy to any J2EEcompliant EJB server. Simple archive

EJB to Oracle8i

Simple archive

1-27

Migrating Oracle9i JDeveloper Beta Projects to Oracle9i JDeveloper Production1. If your project contains XSQL pages, remove these pages from the project in Oracle9i JDeveloper Beta by choosing File | Remove from IDE. You will add these files back in later. Attempting to directly migrate XSQL files from the Beta to the Production release can cause JDeveloper to hang. 2. Follow the instructions for migrating between installations of Oracle9i JDeveloper. 3. If your project contained XSQL files:r r r r

In Oracle9i JDeveloper Production, in the Navigator, select your project node. Choose File | Open. Navigate to the location of your XSQL files. Select your XSQL files and click Open.

4. If you are migrating a Business Components JSP application, update your JSP projects.

1-28

Updating Oracle9i JDeveloper Beta JSP Projects for Oracle9i JDeveloper Production ReleaseJSP projects that use business components data tags or component tags need to be updated before they will work in Oracle9i JDeveloper Production Release.To update JSP projects:

1. Replace /public.html/Web-inf/lib/datatags.jar with /bc4j/lib/datatags.jar. 2. If you use tags, replace them with tags. 3. If you use tags, replace them with tags. 4. If you use tags, check to see if they have a target attribute. If so, replace this attribute with ViewObject="VO", where VO is the name of your target view object. 5. If you use component tags: r Copy /multi/system/templates/common/tagcomp/*.jsp to /public.html.r

Add a tag to every page that uses component tags. This tag should specify the view object to be used as a datasource. If your component tags have the attributes appid and viewobject, remove these attributes and replace them with datasource="DS", where DS is the name of the datasource created in the tag above.

r

6. If you use any data tags that have a TargetUrl attribute, add a tag to each JSP called as a TargetURL. For example, if foo.jsp contains a tag with attribute TargetURL="bar.jsp", you should add a tag to bar.jsp.

1-29

Migrating Oracle9i JDeveloper Release Candidate Projects to Oracle9i JDeveloper Production1. Follow the instructions for migrating between installations of Oracle9i JDeveloper. 2. If you use business components deployed as CMT Service beans, be aware that the functionality of oracle.jbo.server.ejb.sb.ContainerManagedServiceBean has changed. See About Changes to CMT Service Beans for more information.

1-30

About Changes to CMT Service BeansThe implementation of business components service beans with container-managed transactions has changed since the Oracle9i JDeveloper Release Candidate. These changes only affect business components deployed as service beans with container-managed transactions. They do not affect application module session beans (either CMT or BMT), and they do not affect BMT service beans.q

When you end a transaction (by calling UserTransaction.commit() or UserTransaction.rollback()), the database connection is automatically dropped. If you do not want this behavior, override disconnectFromDataSource() with an empty method in your generated service bean class (Server.java): protected void disconnectFromDataSource() { }

q

When you create your service bean, you must pass the name of the datasource into ContainerManagedServiceBean.useDataSource(). You can now use the method ContainerManagedServiceBean.connectToDataSource() to connect to your datasource at any time. You can now use the method ContainerManagedServiceBean.postChanges() to post changes to the database at any time.

q

q

Related Topics About Business Components Service Beans About Container-Managed and Bean-Managed Transactions Using Client-Demarcated Transactions

1-31

Migrating Projects Between Different Installations of Oracle9i JDeveloper1. Open the source installation of Oracle9i JDeveloper. 2. Export your database connections. 3. Close all source views. 4. Close the source installation. 5. Copy /mywork to /mywork. 6. If your projects reference any files outside the mywork directory, those files may need to be copied so that they have the same relative path to /mywork as they had to /mywork. For example, if your projects reference a file in /.., this file must be copied to /... 7. Copy the following files from /system to /system: jbo.properties libraries.xml server.properties XSQLConfig.xml 8. Open the destination installation of Oracle9i JDeveloper. 9. Import and test your database connections.

1-32

Getting Started with JDeveloperq

Getting Started with JDeveloper r Starting a New Programming Projectr

About JDeveloper s About Workspacess s s s s s s s s s

About Projects About Project Paths About Setting Project Properties About Packages About Libraries About J2SEs About Layouts About Connections About Code Insight About Browse Symbol

r

Managing Your Work Using Workspaces and Projects s Creating a New Workspaces s s s s s s

Creating a New Project Creating a New Empty Class Opening an Existing Workspace or Project Importing Existing Files into a New JDeveloper Project Adding Existing Files to an Existing Project Setting Default Project Properties Setting Properties for Individual Projects s Setting the Java Source Paths for a Projects s s

Setting the HTML Document Root for a Project Setting the Output Path for a Project Setting the Classpath for a Project s Including Libraries in a Projects

Removing or Deleting Libraries from a Project2-1

s

Setting Additional Classpath Values for a Project

s s

Setting the Target JDK for a Project Setting Project Configurations s Creating a New Project Configurations s s

Renaming a Project Configuration Changing the Active Project Configuration Deleting a Project Configuration

s s s s s s s s s s s

Browsing Files Through JDeveloper Inspecting the Contents of an Archive in JDeveloper Viewing an Image File in JDeveloper Saving a Workspace or Project Saving a File Relocating a Workspace or Project Unloading a Workspace, Project, or Other File from Memory Removing a File from a Project Removing a Project from a Workspace Removing a Workspace Permanently Deleting a Workspace, Project, or Other File

r

Editing Source Code s Editing Source Code in JDevelopers s s

Editing Source Code with an External Editor Editing Classes Visually with the Class Editor Managing Editor Windows with the Document Bar

r

Designing the User Interface for a Java Project Common Programming Practices in JDeveloper s Implementing a Java Interfaces s

r

Overriding Methods in a Superclass Moving or Renaming Java Classes

2-2

r

Configuring Database Connections s Defining Database Connectionss s s s s

Editing Database Connections Exporting Database Connections Importing Database Connections Opening and Closing Database Connections Deleting Database Connections

r

Printing Source Files Customizing the IDE s Changing the Look and Feel of the IDEs

r

Arranging Windows in the IDE s Docking Windows in the IDEs s

Floating Windows in the IDE Hiding and Reopening Windows in the IDE

s

Working with Navigators in the IDE s Creating a New Navigators s s

Changing Views in the Navigator Docking and Undocking Navigators Opening and Closing Navigators

s

Working with Layouts in the IDE s Defining Custom Layoutss s s s

Activating Defined Layouts Disabling Editor Layout Preferences Renaming Layouts Removing Layouts

s

Customizing the Component Palette s Adding a Page to the Palettes s s

Adding a Component to the Palette Removing a Page from the Palette Removing a Component from the Palette2-3

s

Customizing the IDE Environment s Customizing the General Environment for the IDEs

Working with Keymaps in the IDE s Loading Preset Keymaps for the IDEs s

Viewing Current Accelerator Assignments in Keymaps Defining Custom Accelerators for Keymaps

s

Customizing the Code Editor Environment s Setting Tabs for the Code Editors s s s s s s

Setting Scrolling Options for the Code Editor Setting Display Options for the Code Editor Setting Fonts for the Code Editor Defining Syntax Highlighting for the Code Editor Customizing Code Insight Options for the Code Editor Defining Undo Behavior for the Code Editor Defining Code Completion Templates for the Code Editor

r

Related Reference Topics s Classic Keymappings s s s s s s

Default Keymapping Default CDE Keymapping Default KDE2 Keymapping Emacs Keymapping Visual C ++ Keymapping Regular Expressions JDeveloper's Connection Requirements for Oracle's Type 2 Drivers (OCI)

2-4

Getting Started with JDeveloperTo get started with JDeveloper, you'll want to master certain basic tasks, tasks that are fundamental to getting around in JDeveloper, and making it work for you, no matter what sort of programming project you are undertaking. Once you've mastered the basics, you'll be ready to move onto more specific procedures. Or, if you already know how to work with JDeveloper, use its opening topic to jump directly to the specific support you need for individual projects.The topics here are organized by task. If you are new to JDeveloper, or want a more formalized and linear introduction to its capabilities, you consider working through some of its tutorials as well.

Topic Title Starting a New Programming Project

Topic Description A supertopic. Provides links into the entire helpset to get you the specific info you need, based on the project you are developing, quickly. The potential starting point for all your work.

About JDeveloper

A grouping of foundational conceptual topics to support procedures central to getting started. These are topics designed to be consulted on an asneeded basis or read through more thoroughly, as best suits your needs. Everything you need to know to get started with JDeveloper workspaces and projects. Creating them, importing them, setting their properties, closing them, removing them, deleting them. Editing source files in the Code Editor. Editing source files simultaneously with an external editor and JDeveloper's Code Editor. Editing classes using the Class Editor's visual interface. Opening, closing, and moving through active editor windows using the document bar. The springboard into topics supporting the development of a Java UI.

Managing Your Work Using Workspaces and Projects

Editing Source Code

Designing the User Interface for a Java Project

2-5

Common Programming Practices in JDeveloper

Implementing a Java interface, overriding methods in a superclass, moving and renaming Java classes. Defining, importing and exporting, editing, opening, closing, and deleting database connections. The title says it all. Changing the look and feel of the UI, working with the System Navigator, creating custom navigators, creating and working with layouts, customizing the Component Palette, customizing the IDE, customizing the Code Editor. A grouping of specific and diverse reference topics to support various procedures, normally consulted on an as-needed basis.

Configuring Database Connections

Printing Source Files Customizing the IDE

Related Reference

Related topics Tutorial: Building a Simple Java Application

2-6

Starting a New Programming ProjectRegardless of the type of application you decide to create, you will need to use workspaces and projects to manage your files. What you do from there depends upon the type of program you are building. There are typically many ways of accomplishing a given task in JDeveloper. Since this is an overview, only a single approach is described. For more information on individual procedures, see the documentation as noted. For more information on any window, wizard, or dialog while working in JDeveloper, press F1 for context-sensitive help. In this overview, you will find the basics for accomplishing these tasks:q

Working with existing filesr

Importing existing files into a new project Working with files from source control Working with files hosted on a WebDAV server

r

r

q

Creating a new programming projectr

Creating a UML models s

Modeling activities and workflow Modeling Java classes or Business Components

r

Creating J2EE Business Componentss s

Creating Enterprise JavaBeans (EJB) Creating Business Components for Java (BC4J)

r

Creating an empty class Defining a user interfaces s s s s s

r

Creating JavaServer Pages (JSP) Creating servlets Creating an XSQL application Creating a UIX application Creating a Java application Creating a Java applet2-7

Working with Existing FilesYou can import existing files of any type from a variety of sources into a new project. If you want to import files from source control or from a WebDAV server, you first need to configure JDeveloper to work with your source control system or your WebDAV server.

Importing Existing Files into a New ProjectIn JDeveloper, you use workspaces and projects to organize the files you need for your application. To effectively work with a file in JDeveloper, you will want to add it to a project. Workspaces are used to manage one or more projects. Therefore, if you have existing files you want to use in JDeveloper, you will need to have a workspace and a project.To create a new workspace:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is not selected.

To import existing files into a new JDeveloper project:

1. Select the workspace in the Navigator, and then choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Project with Existing Source in the list of items. 3. Follow the steps of the wizard to create the project and locate the files you want to import.

You can also import files into an existing JDeveloper project by selecting the project in the Navigator and choosing Project | Add to from the JDeveloper main menu. For more information, refer to Managing Your Work Using Workspaces and Projects.

Working with Files from Source Control2-8

JDeveloper provides support for Oracle9i Software Configuration Manager (SCM), Rational ClearCase, and Concurrent Versions System (CVS). To work with files managed by one of these source control systems, you simply need to configure JDeveloper to use your source control system. JDeveloper also allows you to work with any other source control system by writing your own source control addin.To configure JDeveloper for your source control system:

1. Choose Tools | Preferences from the JDeveloper main menu, and select the Source Control node in the Preferences dialog. 2. Select your source control system and enter the required parameters.If you are using Oracle9i SCM, the next step is to create a new SCM connection:

1. Select Oracle9i SCM in the Connections node of the Navigator. 2. Right-click and choose New Connection from the context menu. Follow the steps in the wizard to complete the connection.

JDeveloper is now configured to use source control. For more information, refer to Using Source Control Support.

Working with Files Hosted on a WebDAV ServerWeb-based Distributed Authoring and Versioning (WebDAV) is an extension to HTTP which allows users to collaboratively edit and manage files on WebDAV-enabled servers. You use WebDAV connections in JDeveloper to work with files hosted on WebDAV servers in the same way as you would work with files on the local file system. Important: Before using WebDAV Connections in Oracle9i JDeveloper, you must first install the WebDAV addin from the Oracle Technology Network website. For more information, refer to the Oracle9i JDeveloper Installation Guide for your operating system.To access a WebDAV server outside of a firewall, you will first need to configure your proxy server:

1. Choose Tools | Preferences from the JDeveloper main menu, and select the Proxy Server node in the Preferences dialog. 2. Fill in the details for your proxy server.

2-9

To configure JDeveloper as a WebDAV client:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Connections from the list of categories, and double-click WebDAV Connection in the list of items. 3. Follow the steps in the wizard to complete the connection.

JDeveloper is now configured to access files on the WebDAV-enabled server. For more information, refer to Using WebDAV Support.

Creating a New Programming ProjectThere are many different approaches you can take to coding and many types of programming projects you can create in JDeveloper. This topic describes some of the more typical uses of JDeveloper and how to get started with various projects.

Creating a UML ModelJDeveloper supports the following types of UML diagrams: activity modeling and class modeling.Modeling Activities and Workflow

The Activity Modeler fully supports UML activity modeling, allowing you to model a process usings states and flows. It also has powerful features that enable you to integrate your applications through asynchronous messaging. Once you've created a new workspace and project, you can add an activity diagram to your project and begin modeling.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.

2-10

To add an activity diagram to your new project:

1. Right-click the new project in the Navigator, and choose New UML Diagram from the context menu. 2. In the New Gallery, double-click Activity Diagram in the list of items. 3. In the Create New Activity Diagram dialog, enter the detail for your new diagram or accept the defaults and click OK.

You have now created an activity diagram. For more information, refer to Modeling Activities.Modeling Java Classes or Business Components

The Class Modeler allows you to create UML class diagrams for Java classes and Oracle Business Components for Java. You can use the Class Modeler to create models for new classes, or you can reverse engineer a model from existing classes. A model can be fully synchronized with code. Once you've created a workspace and project, you can add a class diagram to your project and begin modeling.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add a class diagram to your new project:

1. Right-click the new project in the Navigator, and choose New UML Diagram from the context menu. 2. In the New Gallery, double-click Class Diagram in the list of items. 3. In the Create New Class Diagram dialog, enter the detail for your new diagram or accept the defaults and click OK.

You have now created a class diagram. For more information, refer to Modeling Java Classes.

2-11

Creating J2EE Business ComponentsJDeveloper is a J2EE development environment with end-to-end support for developing, debugging, and deploying J2EE applications.Creating Enterprise JavaBeans (EJB)

Enterprise JavaBeans are server-side components used to represent core business functions. JDeveloper provides a productive environment in which to develop, debug, and deploy EJBs. Once you've created a workspace and project, you can add an EJB of any of the EJB types defined in the EJB 1.1 specification to your project.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add an EJB to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Enterprise JavaBeans from the list of categories, and doubleclick the type of EJB you want to create in the list of items. 3. Follow the steps in the wizard to finish creating your EJB.

You have now created an Enterprise JavaBean. For more information, refer to Developing Enterprise JavaBeans.Creating Business Components for Java (BC4J)

To simplify the development of scalable, high-performance J2EE applications, JDeveloper offers an open and extensible J2EE framework called Business Components for Java (BC4J). BC4J is an object-relational mapping tool that implements Sun's J2EE design patterns, allowing developers to quickly build sophisticated J2EE applications.2-12

You can create Business Components based on the definition of existing tables or you can create the Business Components first and use JDeveloper to create the tables for you. Once you've created a workspace, you can use the JDeveloper wizards to help you create a project for your Business Components.To create a new workspace:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is not selected.

To add a Business Components project to your workspace:

1. Right-click the new workspace in the Navigator, and choose New Business Components from the context menu. 2. Follow the steps in the wizard to finish creating your Business Components. If you have not yet defined a connection for the database containing the tables you are building Business Components for, you can do so in the wizard.

You have now created a Business Components for Java project. For more information, refer to Developing Business Components. JDeveloper also simplifies the development of BC4J clients. Once you've defined the Business Components, you can create essentially any type of user interface to use those business components. JDeveloper provides wizards to help you quickly create a JSP or Java user interface for Business Components.To create a JSP user interface for your Business Components:

1. First, make sure the Business Components have been compiled by right-clicking on the project containing your Business Components and choosing Build Project from the context menu. 2. Right-click the workspace containing the BC4J project in the Navigator, and choose New Empty Project from the context menu. 3. Enter the details for the new project and click OK. 4. Select the new project in the Navigator and choose File | New from the JDeveloper main2-13

menu. 5. In the New Gallery, select BC4J JSP from the list of categories, and double-click one of the form types (for example, Browse and Edit Form) in the list of items. 6. Follow the steps in the wizard to finish creating your JSP.

You have now created a JSP application for your Business Components. For more information, refer to Working with Data-Bound BC4J JSP Pages.To create a Java application or applet user interface for your Business Components:

1. First, make sure the Business Components have been compiled by right-clicking on the project containing your Business Components and choosing Build Project from the context menu. 2. Right-click the workspace containing the BC4J project in the Navigator, and choose New Empty Project from the context menu. 3. Enter the details for the new project and click OK. 4. Select the new project in the Navigator and choose File | New from the JDeveloper main menu. 5. In the New Gallery, select JClient Objects from the list of categories, and double-click JClient Form in the list of items. 6. Follow the steps in the wizard to finish creating your JClient application or applet. Note that if you have not yet created a JClient data model for the Business Components, you can do so in the wizard.

You have now created a JClient application or applet for your Business Components. For more information, refer to Working with JClient Applications.

Creating an Empty ClassYou may want to create a new class and add it to your project so that you can define the functionality of that class from scratch. Once you've created a workspace and project, you can add a class to the project and begin defining the behavior of that class.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click2-14

Workspace in the list of items.

3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add an empty class to your project:

1. Right-click the new project in the Navigator, and choose New Class from the context menu. 2. Fill out the details for your new class in the New Class dialog and click OK when finished.

You have now created an empty class. For more information, refer to Creating a New Empty Class. To help you define fields, methods and events for the class, you may want to use the Class Editor to visually edit the class definition.

Defining a User InterfaceJDeveloper simplifies the development of many types of user interfaces.Creating JavaServer Pages (JSP)

JavaServer Pages run on a web server and dynamically generate content (usually HTML) for clients. JDeveloper provides rich support for developing, debugging and deploying JSPs. Once you've created a workspace and project, you can add a JSP to the project and begin defining the behavior of that JSP.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add a JSP to your project:

2-15

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click JSP in the list of items. 3. Enter the details for your new JSP and click OK.

You have now created a JavaServer Page. For more information, refer to Working with JSP Pages. You can also create databound JSP pages.To add elements to your JSP page:

1. Make sure the Component Palette is displayed by selecting View | Component Palette from the JDeveloper main menu. 2. In the JSP editor, place the cursor at the position where you want the JSP tag to be added. 3. Click the tag you want to add in the Component Palette, and fill in the details in the resulting dialog.Creating Servlets

Java servlets run on a web server and dynamically generate content (usually HTML) for clients. JDeveloper provides rich support for developing, debugging and deploying servlets. With servlets, unlike JSP pages, all the content you wish to generate for the client is embedded in Java code. Once you've created a workspace and project, you can add a servlet to the project and begin defining the behavior of that servlet.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add a servlet to your project:

2-16

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click HTTP Servlet in the list of items. 3. Follow the steps in the wizard to complete your new servlet.

You have now created a servlet. For more information, refer to Working with Java Servlets.Creating an XSQL Application

XSQL servlets offer a simple and productive way to get XML in and out of the database. Using simple scripts developers can generate simple or complex XML documents, apply XSL stylesheets to generate any text format, and parse XML documents and store the data in the database. XSQL pages can also access data via Oracle Business Components Java. Once you've created a workspace and project, you can add an XSQL page to the project and begin defining the behavior of that XSQL page.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add an XSQL page to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click XSQL in the list of items.

You have now created an XSQL page. For more information, refer to Working with XSQL Servlets.To add elements to your XSQL page:2-17

1. Make sure the Component Palette is displayed by choosing View | Component Palette from the JDeveloper main menu. 2. In the XML editor, place the cursor at the position where you want the XSQL tag to be added. 3. Click the tag you want to add in the Component Palette, and fill in the details in the resulting dialog.

Once you've defined your XSQL page, you may want to create an XSL stylesheet so that you can transform the XML for clients.To add an XSL stylesheet to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click XSL in the list of items. 3. Once you have defined the XSL stylesheet, apply the stylesheet to an XSQL page by making the appropriate reference to the stylesheet in the code of the XSQL page.Creating a UIX Application

Oracle User Interface XML (UIX) is a set of technologies that constitute a framework for building web applications based on the Oracle Browser Look and Feel. You can use JDeveloper to build UIX applications directly in XML, or to build JSP pages with tags to invoke UIX components. UIX applications can be used to access data via Oracle Business Components for Java. Once you've created a workspace and project, you can add a UIX page to the project and begin defining the behavior of that UIX page.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.

2-18

To add an XML-based UIX page to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select UIX XML from the list of categories, and double-click UIX with Header, Footer, and Navigation in the list of items. 3. Follow the steps in the wizard to complete your new UIX XML page.

You have now created a UIX XML page. For more information, refer to Working with UIX XML and UIX JSP Pages.To add a JSP-based UIX page to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select UIX JSP from the list of categories, and double-click Starter Form in the list of items.

You have now created a UIX JSP page. For more information, refer to Working with UIX XML and UIX JSP Pages.To add elements to your UIX JSP page:

1. Make sure the Component Palette is displayed by selecting View | Component Palette from the JDeveloper main menu. 2. In the JSP editor, place the cursor at the position where you want the UIX JSP tag to be added. 3. Click the tag you want to add in the Component Palette, and fill in the details in the resulting dialog.Creating a Java Application

A Java application is a Java class with a main() method. It typically runs in the VM on the client machine. Once you've created a workspace and project, you can add a Java application to the project and begin defining the behavior of that application.To create a new workspace and project:2-19

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.To add an application to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Objects from the list of categories, and double-click Application in the list of items. 3. In the New Application dialog, enter the details for your new application and click OK. 4. If you chose to add a Frame to your application, enter the details for the Frame and click OK.

You have now created a Java application. For more information, refer to Developing Java GUI Clients.Creating a Java Applet

A Java applet is a Java class which extends javax.swing.JApplet or java.awt.Applet. It typically runs in the VM provided by a web browser (or a plug in to the browser). Once you've created a workspace and project, you can add a Java applet to the project and begin defining the behavior of that applet.To create a new workspace and project:

1. Choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Projects from the list of categories, and double-click Workspace in the list of items. 3. In the New Workspace dialog, enter the name and location of your new workspace, and make sure the Add a New Empty Project checkbox is selected. 4. In the New Project dialog, enter the name and location of your new project.

2-20

To add an applet to your project:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click Applet in the list of items. 3. In the New Applet dialog, enter the details for your new applet.

You have now created a Java applet. For more information, refer to Working with Applets. Once you have defined your applet, you will need to create an HTML page to launch the applet and also to allow you to test the applet in JDeveloper.To create an applet HTML page:

1. With your new project selected in the Navigator, choose File | New from the JDeveloper main menu. 2. In the New Gallery, select Web Objects from the list of categories, and double-click Applet HTML in the list of items. 3. Follow the steps in the wizard to complete the applet HTML page.

Related topics Compiling with JDeveloper Compiling from the Command Line or Shell Debugging Java Programs Remote Debugging

2-21

About JDeveloperThe following topics will introduce you to fundamental JDeveloper concepts and functionality:q

About Workspaces About Projects About Project Paths About Setting Project Properties About Packages About Libraries About J2SEs About Layouts About Connections About Code Insight About Browse Symbol

q

q

q

q

q

q

q

q

q

q

Related topics Starting a New Programming Project

2-22

About WorkspacesIn a sense, what a project is to its group of related files, a workspace is to a group of related projects. Grouping your files by workspace and project enables you to sort your work logically and hierarchically. Just as you can display several projects at one time, so you can display several workspaces. You can "tear off" workspaces into separate navigator windows, should you wish, or leave them all displayed in the default System Navigator. Closing a workspace or project unloads those files from memory. Removing a workspace or project from the IDE can help reduce clutter when you are not working with a given set of files. Removing files from the IDE does not delete them from where they reside. It only affects whether or not they are displayed in the Navigator. The listing of files for a given workspace is stored in the workspace file, the