| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB Builder JA |
| Contents | Index |
| Learn more about MATLAB Builder JA |
To use a component generated by the MATLAB Builder JA product:
Import MATLAB libraries with the Java import function, for example:
import com.mathworks.toolbox.javabuilder.*;
Import the component classes created by the builder, for example:
import com.mathworks.componentname.classname;
Tip It is important to note the difference between the component and the package names. The component name is the last part of the full package name, and is what is used in the .JAR file (and the embedded CTF file within the JAR). For example, in mcc -W java:com.mathworks.demos.HelloDemo hello.m, the component name is demos and the package name is com.mathworks.demos. The import statement should include the full package name: import com.mathworks.demos.HelloDemo; |
Note When you use the MATLAB Builder JA product to create classes, you must create those classes on the same operating system to which you are deploying them for development (or for use by end users running an application). For example, if your goal is to deploy an application to end users to run on Windows, you must create the Java classes with the MATLAB Builder JA product running on Windows. The reason for this limitation is that although the .jar file itself might be platform independent, the .jar file is dependent on the embedded .ctf file, which is intrinsically platform dependent. It is possible to make your .ctf file platform independent in certain circumstances; see Ensuring Multi-Platform Portability for more details. |
![]() | About the MATLAB Builder JA API | Creating an Instance of the Class | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |