External Interfaces/API    

Bringing Java Classes into MATLAB

You can draw from an extensive collection of existing Java classes or create your own class definitions to use with MATLAB. This section explains how to go about finding the class definitions that you need or how to create classes of your own design. Once you have the classes you need, defined in either individual .class files, packages, or Java Archive files, you will see how to make them available within the MATLAB environment.

This section addresses the following topics:

Sources of Java Classes

There are three main sources of Java classes that you can use in MATLAB:

Defining New Java Classes

To define new Java classes and subclasses of existing classes, you must use a Java development environment, external to MATLAB, that supports Java version 1.1. You can download the development kit that supports the version 1.1.8 Java Virtual Machine from the web site at Sun Microsystems, (http://www.java.sun.com/jdk/). The Sun site also provides documentation for the Java language and classes that you will need for development.

After you create class definitions in .java files, use your Java compiler to produce .class files from them. The next step is to make the class definitions in those .class files available for you to use in MATLAB.


  Using Java from MATLAB: An Overview Making Java Classes Available to MATLAB