External Interfaces/API    

Calling Java from MATLAB


This chapter describes how to use the MATLAB interface to Java classes and objects. This MATLAB capability enables you to conveniently bring Java classes into the MATLAB environment, to construct objects from those classes, to call methods on the Java objects, and to save Java objects for later reloading -- all accomplished with MATLAB functions and commands.
Using Java from MATLAB: An Overview
How you can benefit from using the MATLAB Java interface
Bringing Java Classes into MATLAB
Using Java built-in, third-party, or your own classes
Creating and Using Java Objects
Constructing and working with Java objects
Invoking Methods on Java Objects
Calling syntax, static methods, querying MATLAB about methods
Working with Java Arrays
How MATLAB represents Java arrays and how to work with them
Passing Data to a Java Method
How to pass MATLAB data types into Java
Handling Data Returned from a Java Method
How to handle data types returned by Java
Introduction to Programming Examples
Introduction and links to sample programs that use the MATLAB interface to Java
Example - Reading a URL
Open a connection to a Web site and read text from the site using a buffered stream reader
Example - Finding an Internet Protocol Address
Call methods on an InetAddress object to get hostname and IP address information
Example - Communicating Through a Serial Port
Create a SerialPort object and configure the port using methods provided by that class
Example - Creating and Using a Phone Book
Create a phonebook using a data dictionary that operates using key/value pairs in a hash table


  Compiling and Linking on Windows Using Java from MATLAB: An Overview