Running COMSOL Multiphysics > Running COMSOL Multiphysics > COMSOL API

COMSOL API
The COMSOL API is a Java-based programming interface for COMSOL Multiphysics. The COMSOL API can be used for a variety of purposes, such as developing standalone applications based on COMSOL functionality or running a model file for Java from the COMSOL Desktop or using the available batch command.
To run a model file for Java from the COMSOL Desktop, compile it using the COMSOL compile command. This command is called comsolcompile on Windows® and comsol compile on other platforms. The compilation gets you a model class file corresponding to the model file for Java. Launch the model class file by selecting Open on the File menu, and selecting a Model Class File under File name.
To create a standalone application using the COMSOL API, you need to develop a text-based or GUI-based interface to the functionality and compile it using the COMSOL compile command. The application can be run in standalone mode that links your Java® application directly to the COMSOL code (as a single process). You can also choose to run the application in client-server mode by connecting to a COMSOL Multiphysics server.
To see options for compiling Java files, see The COMSOL Commands for your platform. For more comprehensive information about the COMSOL API, see the COMSOL Programming Reference Manual.