First make sure that COMSOL Multiphysics is installed. See the COMSOL Multiphysics Installation Guide for more information if required.
Before getting started, also download and install a Java® Development Kit (JDK) from
www.oracle.com/technetwork/java/index.html. You need the JDK to compile the Java file that COMSOL generates. You must compile your Java files with JDK 1.7 or lower.
To test compiling a model files for Java, load feeder_clamp.mph from the COMSOL Multiphysics Applications Libraries into the COMSOL Desktop.
In the Application Libraries tree, expand COMSOL Multiphysics and then
Structural Mechanics. Select the
feeder_clamp model, then click the
Open button to open it. To get a Java file to compile, choose
Save As from the
File menu and choose
Model file for Java (*.java) as the file type. It is suggested that you save the file as
feeder_clamp.java in your home directory.
on Linux and Mac, where <COMSOL path> is the COMSOL installation directory and
<JDK path> is the installation directory for the JDK.