Documentation Center

  • Trial Software
  • Product Updates

Overview of Java Interface

Java Interface Is Integral to MATLAB

Every installation of MATLAB® includes Java® Virtual Machine (JVM™) software. You can use the Java interpreter via MATLAB commands, and you can create and run programs that create and access Java objects. For information on the MATLAB installation, see the MATLAB installation documentation for your platform.

Benefits of the MATLAB Java Interface

The MATLAB Java interface enables you to:

  • Access Java API (application programming interface) class packages that support essential activities such as I/O and networking. For example, the URL class provides convenient access to resources on the Internet.

  • Access third party Java classes

  • Easily construct Java objects in MATLAB workspace

  • Call Java object methods, using either Java or MATLAB syntax

  • Pass data between MATLAB variables and Java objects

Who Should Use the MATLAB Java Interface

The MATLAB Java interface is intended for MATLAB users who want to take advantage of the special capabilities of the Java programming language.

  • You need to access, from MATLAB, the capabilities of available Java classes.

  • You are familiar with object-oriented programming in Java or in another language, such as C++.

  • You are familiar with the MATLAB Class System, or with MEX-File Creation API.

To Learn More About Java Programming Language

For a complete description of the Java language and for guidance in object-oriented software design and programming, consult outside resources.

Platform Support for JVM Software

To find out which version of JVM software MATLAB uses on your platform, type the following at the MATLAB prompt:

version -java
Was this topic helpful?