export_model_java
Exports a COMSOL model as a compilable .java source file that rebuilds the model without solution data. Use .mph export when a full model file is needed.
Instructions
Export the model as a COMSOL Java model file (.java source).
Verified live in COMSOL 6.4: model.java.save(path, "java") writes a
compilable Java class that rebuilds the model (a few KB; does not contain
the solution data). Use export_model_file for a full .mph.
Args:
path: output .java path (auto under artifact root when omitted).
model: model name/tag (None = current model).
Returns:
{"path","size","exists","format":"java"}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export_model_java"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| model | No |