Oracle JDeveloper 10g Build Applications with ADF Instructor Guide - Volume 2.pdf
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
-
Upload
lily-conway -
Category
Documents
-
view
224 -
download
0
Transcript of 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
![Page 1: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/1.jpg)
6Copyright © 2005, Oracle. All rights reserved.
Building Applications with Oracle JDeveloper 10g
![Page 2: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/2.jpg)
6-2 Copyright © 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to do the following:
• Create new projects, workspaces, and applications
• Build Java applications in JDeveloper
• Enhance user interface frame design
• Debug an application using JDeveloper debugger
• Define classes using JDeveloper
• Describe how JDeveloper can be used to build enterprise applications
![Page 3: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/3.jpg)
6-3 Copyright © 2005, Oracle. All rights reserved.
What Is Oracle JDeveloper 10g?
• Oracle JDeveloper 10g provides an integrated development environment (IDE).
• Build, compile, and run Java applications with Oracle JDeveloper.
• Use wizards to help build source code.
• View objects from many perspectives: code, structure, layout, and so on.
![Page 4: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/4.jpg)
6-4 Copyright © 2005, Oracle. All rights reserved.
Exploring the JDeveloper Environment
System Navigator Code Editor Property Inspector
Component Palette
![Page 5: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/5.jpg)
6-5 Copyright © 2005, Oracle. All rights reserved.
Examining Workspaces
• Contain multiple projects
• Enable you to view currently used objects
Workspace
Navigator pane
Structure pane
![Page 6: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/6.jpg)
6-7 Copyright © 2005, Oracle. All rights reserved.
What Are Projects?
• Contain related files
• Manage project and environment settings
• Manage compiler and debug options
Project
Projectfiles
![Page 7: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/7.jpg)
6-8 Copyright © 2005, Oracle. All rights reserved.
Creating JDeveloper Items
• JDeveloper items areinvoked by selecting File > New.
• They are categorized by type:– General– Business Tier– Client Tier– Database Tier– Web Tier
• Create any JDeveloper element.
![Page 8: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/8.jpg)
6-9 Copyright © 2005, Oracle. All rights reserved.
Creating an Application Workspace
In the General category, select Application Workspace to invoke the Property pane.
![Page 9: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/9.jpg)
6-10 Copyright © 2005, Oracle. All rights reserved.
Specifying Project Details
![Page 10: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/10.jpg)
6-11 Copyright © 2005, Oracle. All rights reserved.
Selecting Additional Libraries
![Page 11: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/11.jpg)
6-12 Copyright © 2005, Oracle. All rights reserved.
Adding a New J2SE
New J2SE definitions include:• Java executable• A classpath• A source path • A doc path
![Page 12: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/12.jpg)
6-13 Copyright © 2005, Oracle. All rights reserved.
Looking at the Directory Structure
JDeveloper creates and stores .java and .class files by using the following convention:
• <ORACLE_HOME>\jdev\mywork• Followed by the workspace
name
• Followed by the project name– \classes\<package name>\– \src\<package_name>\
• Followed by class and src files
![Page 13: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/13.jpg)
6-14 Copyright © 2005, Oracle. All rights reserved.
Exploring the Skeleton Java Application
Contains application and frame classes
![Page 14: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/14.jpg)
6-15 Copyright © 2005, Oracle. All rights reserved.
Finding Methods and Fields
Find methods and fields by using the Structure pane.
![Page 15: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/15.jpg)
6-16 Copyright © 2005, Oracle. All rights reserved.
Supporting Code Development with Profiler and Code Coach
• Improve code quality with Code Coach.
• Evaluate execution stack with Execution Sample profiler.
• Examine heap memory usage with Memory profiler.
• Analyze event occurrence and duration with Event profiler for:– JVM events– Business Components for Java events– Custom events
![Page 16: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/16.jpg)
6-17 Copyright © 2005, Oracle. All rights reserved.
Customizing JDeveloper
Customize the IDE
• Look and feel
• General environment
• Dockable windows
• Component Palette
• Load preset keymaps
Rename classes and packages by using refactoring.
![Page 17: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/17.jpg)
6-18 Copyright © 2005, Oracle. All rights reserved.
Using the Help System
![Page 18: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/18.jpg)
6-19 Copyright © 2005, Oracle. All rights reserved.
Obtaining Help on a Topic
Use [F1] to invoke context-specific Help.
![Page 19: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/19.jpg)
6-20 Copyright © 2005, Oracle. All rights reserved.
Oracle JDeveloper 10g Debugger
• Helps find and fix program errors:– Run-time errors– Logic errors
• Allows control of execution
• Allows examination of variables
![Page 20: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/20.jpg)
6-22 Copyright © 2005, Oracle. All rights reserved.
Setting Breakpoints
Setting breakpoints:
• Manage multiple breakpoints
• Manage conditional breakpoints
• Define columns displayed in window– Description– Type– Status, and so on
• Control scope of action – Global > Workspace > Project
![Page 21: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/21.jpg)
6-24 Copyright © 2005, Oracle. All rights reserved.
Using the Debugger Windows
View Debug information:
• Classes: Displays list of loaded classes and status
• Watch: Evaluates and displays expressions
• Monitors: Displays information about active monitors
• Threads: Displays the names and statuses of all threads
• Smart Data: Analyzes source code near execution point
• … and more
![Page 22: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/22.jpg)
6-25 Copyright © 2005, Oracle. All rights reserved.
Stepping Through a Program
Step through a program by using the buttons on the Debugger toolbar:
• Start the debugger.
• Resume the program.
• Step over a method call.
• Step into a method call.
• Step out of a method call.
• Step to the end of the method.
• Pause execution.
• Stop the debugger.
![Page 23: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/23.jpg)
6-26 Copyright © 2005, Oracle. All rights reserved.
Watching Data and Variables
• The Smart Data tab displays analyzed variables and fields.
• The Data tab displays arguments, local variables, and static fields from the current context.
• To watch other variables:– Select a variable in the source window and right-
click.– Select Watch... at Cursor from the context menu.– View the variable in the Watch tab.– Right-click a data item to modify it.
![Page 24: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/24.jpg)
6-27 Copyright © 2005, Oracle. All rights reserved.
Summary
In this lesson, you should have learned how:
• JDeveloper builds, debugs, and runs all types of Java applications
• JDeveloper can be used to develop:– Java applications– Java servlets– JSPs– EJBs
• JDeveloper can be used to build enterprise applications
![Page 25: 6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.](https://reader036.fdocuments.in/reader036/viewer/2022062303/55150eef550346c77d8b49ed/html5/thumbnails/25.jpg)
6-28 Copyright © 2005, Oracle. All rights reserved.
Practice 6: Overview
This practice covers:
• Exploring the Oracle JDeveloper 10g IDE
• Creating a workspace and project
• Including application files from the earlier lesson