MATLAB BUILDER JA 2 Podręcznik Użytkownika Strona 18

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 17
1 Getting Started
Using the Comm and Line to Create Java Components (Contin ued)
Action to Perform
mcc Option to Use Description
-S
Tells Java Builder to create a single MCR when the
first Java class is instantiated. T his M CR i s reused
and shared among all subsequent class instances
within the component, resulting in more efficient
memory usage and eliminating the MCR startup
cost in each subsequent class instantiation.
By default, a new MCR instance is created for each
instance o f each Java class i n the component. Use
-S to change the default.
When using
-S, note that all class instances
share a single MATLAB workspace and share
global variables in the M-files used to build the
component. This makes properties of a Java class
behave as static properties instead of instance-wise
properties.
Control how each
Java class uses the
MCR.
Example
mcc -S 'java:mycomponent,myclass' foo.m bar.m
The example creates a Java component called mycomponent containing
asingleJavaclassnamed
myclass with methods foo and bar.(Seethe
first example in this table).
If and when multiple instances of
myclass are instantiated in an
application, only o ne MCR is ini t ialized, and it is shared by all instances
of
myclass.
Specify a directory
for output
-d dir ectoryname
Tells Java Builder to create a directory and copy
the output files to it. (If you use
mcc instead
of the GUI, the
project_directory\src and
project_directory\distrib directories are not
automatically created.)
1-10
Przeglądanie stron 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag