Writing Java plug-ins
Rhapsody® plug-ins can be written in Java™.
About this task
While the steps described in this section can be carried out using any Java IDE, the text and screen captures provided demonstrate how to perform these steps in Eclipse.
To write the Java code for your plug-ins:
Procedure
- Create a new Java project
- Add theRhapsody library to the project build path
- Define a Java class for the plug-in
- Implement the required methods
Creating Java projects
To create Java projects, from the Eclipse main menu, select .
Adding Rhapsody library to project build path
In order to build your Java application, you have to specify the location of the rhapsody.jar file as well as the location of the native library that is required.
Procedure
- In the Package Explorer View, right-click the project that you created, and then select .
- Go to the Libraries tab and click Add External JARs.
-
Select rhapsody.jar, under
<Rhapsody installation path>\Share\JavaAPI -
After rhapsody.jar has been added to the list, expand it and set the Native library location to
<Rhapsody installation path>\Share\JavaAPI