Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

Java.NewClassObject

Creates a new object and invokes constructor.

Component Version macOS Windows Linux Server iOS SDK
Java 6.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ❌ No
MBS( "Java.NewClassObject"; ClassName; ConstructorName; Signature { ; Params... } )   More

Parameters

Parameter Description Example Flags
ClassName The name of the java class. "com.mbs.test"
ConstructorName The name of the constructor. "test"
Signature The java signature of the method.
This describes the parameter types.
"()"
Params... The parameters to pass.
Pass one parameter in FileMaker for each parameter to pass.
Optional

Result

Returns object reference or error.

Description

Creates a new object and invokes constructor.
Parameters and return type is detected by plugin automatically from signature.
Please call later Java.Release to release the object.

Java is only available if you call Java.Initialize before to load the java runtime.

This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.
Please repeat Params parameter as often as you need.

Examples

Create a new test object with default constructor:

MBS( "Java.NewClassObject"; "test"; "<init>"; "()V")

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 2nd October 2016, last changed 5th June 2021


Java.List - Java.ObjectClassName

💬 Ask a question or report a problem