In JDeveloper, you work within projects that are contained in applications.
An application is the highest level in the control structure, serving as a collector of all the subparts of the application. When you open JDeveloper, the applications, which were opened when you last closed JDeveloper, are opened by default.
A JDeveloper project is an organization structure used to logically group related files. In a J2EE application, a project typically represents a part of the application architecture, such as the data model or a part of the client.
You can add multiple projects to your application to easily organize, access, modify, and reuse your source code.
Before you create any application components, you must first create the application and its projects. Use the following procedure to create the new SRDemo application and its projects.
Note: Do not include special characters in the project name (such as periods) or in any activity or element names. If you include special characters, errors appear when you attempt to compile your project.
1. To create an application, click in the Applications Navigator, right-click the Applications node, and select New Application from the shortcut menu.
Keep the default value. If you used the default directory structure, then your path should match this value. The directory is created for you in the specified path, which represents the application.
This value becomes the prefix for all Java package names. You can override it later if necessary.
No Template [All Technologies]
In this tutorial, you access all of JDeveloper’s technologies. New templates can be created and added to restrict the technologies that are available during development.
- In the Create Application window, enter the following values:
- Click OK.
4. The Create Project dialog box appears. Set the values as follows:
Project Name DataModel
|Directory name||<jdev_install>\jdev\mywork\SRDemo\DataModelKeep the default value. If you used the recommended directory structure, then your path should match this value. The directory is created for you in the specified path to contain the project’s files.|
- Click OK.
The DataModel project represents the data model tier of your application. You build the components of this project in the next chapter by using Oracle TopLink.
- Create another Project at the same level as the DataModel project. In the Applications Navigator, right-click the SRDemo node and select New Project.
- The New Gallery is invoked. Verify that Empty Project is selected. Then click OK.
The new project becomes the child of a selected application node. To find out more about the types of projects and when they should be used, search Help for “Projects Category.”
- In the Create Project pane, set the values as follows.
Project Name UserInterface
Keep the default value. If you used the recommended directory structure, your path should match this string.
- Click OK. The UserInterface project represents the remainder of the application and contains the files that you create for the user interface in later chapters.
10. Double-click the new UserInterface project and select the Dependencies node.
11. Select the check box associated with the DataModel project. This enables the UserInterface project to access objects created in the DataModel project.
12. Select the Project Content node. At the bottom of the panel, set the Default Package to oracle.srdemo.userinterface. Then press OK. This enables you to better manage your classes and files.
13.Double-click the DataModel project and select the Project Content node.
14.At the bottom of the panel, set the Default Package to oracle.srdemo.datamodel. Then press OK. This enables you to better manage your classes and files.
Your Applications Navigator should look like the following screenshot. You are now ready to create application components for the tutorial.
In this chapter, you carried out all of the prerequisite steps that you need to complete before starting to build the application. You performed the following key tasks:
Prepared the tutorial schema setup
Installed the Service Request schema
Created a JDeveloper database connection
Defined an application and its projects in JDeveloper