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:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Queries a static field on a class.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Java | 6.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |
Parameter | Description | Example |
---|---|---|
ClassName | The name of the java class. | "com.mbs.test" |
FieldName | The name of the field. | "test" |
Signature | The java signature of the field. This describes the data type of the field. |
"I" |
Returns value or error.
Test static field:
Set Variable [$r; Value:MBS( "Java.SetStaticField"; "test"; "n"; "I"; 3456)]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "test"; "n"; "I")]
Show Custom Dialog ["value"; $r]
Query various static fields:
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_boolean"; "Z")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_byte"; "B")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_byteArray"; "[B")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_char"; "C")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_charArray"; "[C")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_double"; "D")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_float"; "F")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_int"; "I")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_long"; "J")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_short"; "S")]
Set Variable [$r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_string"; "Ljava/lang/String;")]
Created 2nd October 2016, last changed 17th August 2018
Java.GetObjectField - Java.Initialize
Feedback: Report problem or ask question.