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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 292
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 19
1 Getting Started
Developing an Application
1 If the co mponent is not already i nstalled on t h e machin e where you want to
develop your application, unpack and install the component as follows:
a. Copy the package that was created in the last step in “Creating a Java
Component” on page 1-5.
b. If the package is a self-extracting executable, paste the package in a
directory on the development machine, and run it. If the package is a
.zip file, unzip and extract the contents to the development machine.
Note You must repeat these steps for each development machine where
you want to use the components.
The first step is not necessa ry if you are developing your app li cati on on the
same machine where you created the Java component.
2 If you have not already done so, set the environment variables that are
required on a d ev elo pm ent machine. See “Settings for Environment
Variables (Development M achine)” on page 6-2.
3 Import the MAT
LAB libraries and the component classes into your code
with the Java
import functio n. For example:
import com.mathworks.toolbox.javabuilder.*;
import componentname.classname; or import componentname.*;
4 Use the new fu
nction in your Java code to create an instance of each class
you want to us
e in the application.
5 Call the class methods a s you would do with any Java class.
6 Handle data conversion as needed.
When you invoke a method on a Java Builder compone nt, the input
parameters received by the method must be in the MATLAB internal array
format. You can either (manually) convert them y ourself within the calling
program, or pass the parameters as Java data types.
1-12
Przeglądanie stron 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 291 292

Komentarze do niniejszej Instrukcji

Brak uwag