Build JAVA Beans
- Open Eclipse.
-
From the menu bar, select File > > New > > Project.
The New Project dialog opens.
- Select Java Project from the dialog options.
-
Click Next.
A New Java Project dialog appears.
- Enter MyFirstBean as the Project name.
-
Click Finish.
You are now able to view your project.
-
Right-click your project name, MyFirstBean, and select Build Path > Add Libraries.
An Add Library dialog opens.
- Select User Library.
- Click Next.
-
Select the User Libraries button located on the right
hand side of the Add Library dialog.
The Preferences (Filtered) dialog is displayed.
-
Click New located on the right hand side of the
dialog.
The New User Library dialog is displayed.
- Enter PM_LIBS as the User library name.
-
Click OK.
The library name, PM_LIBS, will now appear under the Defined user libraries box in the Preferences (Filtered) panel.
-
Select the library name and click the Add JARs
button.
-
Browse for the JAR files in the Altair
installations directory.
<<ALTAIR_HOME>>\javaapps\win32\pmgr\lib
-
Select all JAR files and click OK.
Note: In UNIX Environment, check with administrator on where Altair installation is located for pmgr/lib directory.
After adding the JAR files to the PM_LIBS library, your screen should look like this:
- Click the New button and Create a new user library titled PM_CONTROLS.
-
Click OK.
PM_CONTROLS will now appear in the Preferences (Filtered) panel, under the Defined user libraries.
- Select PM_CONTROLS and click the Add JARs button.
-
Add JAR files to the library by selecting the files from the directory
<<ALTAIR_HOME>>\javaapps\win32\pmgr\controls
These files should be added to the PM_CONTROLS library:
“dbbeans.jar “ form <<ALTAIR_HOME>>\javaapps\win32\pmgr\controls\database
“hmsuit.jar “ form <<ALTAIR_HOME>>\javaapps\win32\pmgr\controls\hm
“hwmtils.jar “ form <<ALTAIR_HOME>>\javaapps\win32\pmgr\controls\utils
After adding the JAR files, your dialog box should look like the figure below.
-
Click OK.
The Add Library dialog appears with both PM_CONTROLS and PM_LIBS listed.
-
Click Finish.
You are now ready to create your first bean.