Build JAVA Beans

  1. Open Eclipse.
  2. From the menu bar, select File > > New > > Project.
    The New Project dialog opens.
  3. Select Java Project from the dialog options.
  4. Click Next.
    A New Java Project dialog appears.
  5. Enter MyFirstBean as the Project name.
  6. Click Finish.
    You are now able to view your project.


    Figure 1.
  7. Right-click your project name, MyFirstBean, and select Build Path > Add Libraries.
    An Add Library dialog opens.
  8. Select User Library.
  9. Click Next.
  10. Select the User Libraries button located on the right hand side of the Add Library dialog.
    The Preferences (Filtered) dialog is displayed.
  11. Click New located on the right hand side of the dialog.
    The New User Library dialog is displayed.
  12. Enter PM_LIBS as the User library name.
  13. Click OK.
    The library name, PM_LIBS, will now appear under the Defined user libraries box in the Preferences (Filtered) panel.
  14. Select the library name and click the Add JARs button.


    Figure 2.
  15. Browse for the JAR files in the Altair installations directory.
    <<ALTAIR_HOME>>\javaapps\win32\pmgr\lib
  16. 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:



    Figure 3.
  17. Click the New button and Create a new user library titled PM_CONTROLS.
  18. Click OK.
    PM_CONTROLS will now appear in the Preferences (Filtered) panel, under the Defined user libraries.
  19. Select PM_CONTROLS and click the Add JARs button.
  20. 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.



    Figure 4.
  21. Click OK.
    The Add Library dialog appears with both PM_CONTROLS and PM_LIBS listed.
  22. Click Finish.


    Figure 5.

    You are now ready to create your first bean.