MATLAB BUILDER JA 2 User's Guide Page 13

  • Download
  • Add to my manuals
  • Print
  • Page
    / 292
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 12
CreatingaJavaComponent
Creating a Java Component
To create a component you need to write M-code (or use existing code) and
then create a project in MATLAB Builder for Java that encapsulates the code.
In general, the steps are as follows:
1 Write,test,andsavetheMATLABcodetobeusedasthebasisforthe
Java component.
2 Set the environ
ment variables that are required on a d ev elopment machine.
See “Settings f
or Environment Variables (Development Machine) on page
6-2.
3 W hile you are still in MATLAB, issue the following command to open the
Deployment Tool:
deploytool
4 Use the Deployment Tool to create a project that contains one or more
classes.
a. Create the project by clicking the New Project icon
in the t oolbar.
b. Specify the project name and location.
Bydefaulttheprojectnameisassignedtobethenameofthepackage
to be created. You can change the default.
c. Add class names for classes that you want to create as part of the
Java package.
d. Add one or more M-files that you want to encapsulate in each class.
e. Add helper files as needed to support the classes.
f. Save the project.
5 Build the package.
The b uild process for a project copies a Jav a wrapper class in the
\src
subdirectory of your project directory. It also copies a .jar file and .ctf
file in the \distrib subdirectory of your project directory. The files in the
\distrib directory define your Java component.
1-5
Page view 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 291 292

Comments to this Manuals

No comments