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
MBS(
"Java.NewClassObject"; /* Creates a new object and invokes constructor. */
$ClassName; /* The name of the java class.e.g. "com.mbs.test" */
$ConstructorName; /* The name of the constructor.e.g. "test" */
$Signature; /* The java signature of the method.
This describes the parameter types.e.g. "()" */
$Params...) /* Optional; The parameters to pass.
Pass one parameter in FileMaker for each parameter to pass. */
Less
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