MBS FileMaker Plugin Example Databases

Java Tests

All examples are included with download of MBS FileMaker Plugin.

Java Tests.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenScript: Start
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Java Test
5 fields defined, 1 record
Java Test

Fields

Table Name: Java Test - 5 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
Path to Java LibraryNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      ClassPath1Normal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          TestContainerNormal, BinaryAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
              ContainerResult1Normal, BinaryAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
                  ContainerResult2Normal, BinaryAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1

                      Layout Objects: Java Test

                      Regular Fields

                      Field Name: Java Test::Path to Java Library
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 66 pt
                      • Left: 142 pt
                      • Bottom: 87 pt
                      • Right: 395 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      Yes

                      Field Name: Java Test::ClassPath1
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 89 pt
                      • Left: 142 pt
                      • Bottom: 110 pt
                      • Right: 395 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      Yes

                      Field Name: Java Test::TestContainer
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 52 pt
                      • Left: 709 pt
                      • Bottom: 177 pt
                      • Right: 962 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      No

                      Field Name: Java Test::ContainerResult1
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 179 pt
                      • Left: 709 pt
                      • Bottom: 304 pt
                      • Right: 962 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      No

                      Field Name: Java Test::ContainerResult2
                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                      • Top: 306 pt
                      • Left: 709 pt
                      • Bottom: 431 pt
                      • Right: 962 pt
                      • Anchoring: Left, Top
                      Field Format:
                      • Edit Box
                      Field Behavior:
                      • Allow field to be entered: In Find mode, In Browse mode
                      • Touch keyboard type: Default for Data Type
                      • Go to next field using: Tab key
                      No

                      Buttons

                      Button PropertiesCoordinatesScript/Script Step
                        Type:
                      • Text: Initialize
                      • Top: 186 pt
                      • Left: 67 pt
                      • Bottom: 217 pt
                      • Right: 197 pt
                      • Anchoring: Left, Top
                      Perform Script [ “Initialize” ]

                      Scripts:


                      Button PropertiesCoordinatesScript/Script Step
                        Type:
                      • Text: Tests
                      • Top: 226 pt
                      • Left: 67 pt
                      • Bottom: 257 pt
                      • Right: 197 pt
                      • Anchoring: Left, Top
                      Perform Script [ “Tests” ]

                      Scripts:


                      Script Hierarchy

                      Initialize
                      Tests
                      Start
                      Clear Fields

                      Next Script: [Tests]
                      Script NameInitialize
                      Run script with full access privilegesOff
                      Include In MenuYes
                      Layouts that use this script
                      Scripts that use this script
                        Script Definition
                        Script Steps
                        • Set Variable [ $r; Value:MBS("Trace") ]
                        • Set Variable [ $r; Value:MBS("Java.Initialize"; Java Test::Path to Java Library; Java Test::ClassPath1) ]
                        • If [ MBS("Java.Initialized") ]
                        • Show Custom Dialog [ Title: "Java"; Message: "Java initialized."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                        • Else
                        • Show Custom Dialog [ Title: "Java"; Message: "Java failed to initialize" & ¶ & $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                        • End If
                        Fields used in this script
                        Scripts used in this script
                          Layouts used in this script
                            Tables used in this script
                            Table occurrences used by this script
                            Custom Functions used by this script
                              Custom menu set used by this script

                                Previous Script: [Initialize]Next Script: [Start]
                                Script NameTests
                                Run script with full access privilegesOff
                                Include In MenuYes
                                Layouts that use this script
                                Scripts that use this script
                                  Script Definition
                                  Script Steps
                                  • Set Variable [ $r; Value:MBS( "Trace") ]
                                  • #Test static methods
                                  • Set Variable [ $r; Value:MBS( "Java.CallStaticMethod"; "tests"; "GetString"; "()Ljava/lang/String;" ) ]
                                  • If [ MBS("IsError") or (Left ( $r ; 5 ) ≠ "Hello") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "String function failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.CallStaticMethod"; "tests"; "method_int"; "(IDCJS)I"; 10000; 2000; 300; 40; 5 ) ]
                                  • If [ MBS("IsError") or ($r ≠ 12345) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static int method failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.CallStaticMethod"; "tests"; "method_double"; "(IDCJS)D"; 10000; 2000; 300; 40; 5 ) ]
                                  • If [ MBS("IsError") or ($r ≠ 12345) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static double method failed" ]
                                  • End If
                                  • #Test static properties
                                  • #int
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_int"; "I"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_int"; "I") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #long
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_long"; "J"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_long"; "J") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #char
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_char"; "C"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_char"; "C") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #short
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_short"; "S"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_short"; "S") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #boolean
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_boolean"; "Z"; 1) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_boolean"; "Z") ]
                                  • If [ MBS("IsError") or ($r ≠ 1) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #double
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_double"; "D"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_double"; "D") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #float
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_float"; "F"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_float"; "F") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #byte
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_byte"; "B"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_byte"; "B") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #string
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_string"; "Ljava/lang/String;"; "123") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_string"; "Ljava/lang/String;") ]
                                  • If [ MBS("IsError") or ($r ≠ "123") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #char array
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_charArray"; "[C"; "123") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_charArray"; "[C") ]
                                  • If [ MBS("IsError") or ($r ≠ "123") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • End If
                                  • #byte array
                                  • Set Variable [ $r; Value:MBS( "Java.SetStaticField"; "tests"; "static_property_byteArray"; "[B"; Java Test::TestContainer) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.SetContainerFileName"; "Logo.png" ) ]
                                  • Set Variable [ $r; Value:MBS( "Java.GetStaticField"; "tests"; "static_property_byteArray"; "[B") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Static get property failed" ]
                                  • Else
                                  • Set Field [ Java Test::ContainerResult1; $r ]
                                  • End If
                                  • #Create object
                                  • Set Variable [ $j; Value:MBS( "Java.NewClassObject"; "tests"; "<init>"; "()V") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $j; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Constructor failed" ]
                                  • End If
                                  • #Call method
                                  • Set Variable [ $r; Value:MBS( "Java.CallObjectMethod"; $j; "method_void"; "()V" ) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "Method Void Call failed" ]
                                  • End If
                                  • #Test properties
                                  • #int
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_int"; "I"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_int"; "I") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #long
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_long"; "J"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_long"; "J") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #char
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_char"; "C"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_char"; "C") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #short
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_short"; "S"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_short"; "S") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #boolean
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_boolean"; "Z"; 1) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_boolean"; "Z") ]
                                  • If [ MBS("IsError") or ($r ≠ 1) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #double
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_double"; "D"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_double"; "D") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #float
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_float"; "F"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_float"; "F") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #byte
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_byte"; "B"; 123) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_byte"; "B") ]
                                  • If [ MBS("IsError") or ($r ≠ 123) ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #string
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_string"; "Ljava/lang/String;"; "123") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_string"; "Ljava/lang/String;") ]
                                  • If [ MBS("IsError") or ($r ≠ "123") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #char array
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_charArray"; "[C"; "123") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_charArray"; "[C") ]
                                  • If [ MBS("IsError") or ($r ≠ "123") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • End If
                                  • #byte array
                                  • Set Variable [ $r; Value:MBS( "Java.SetObjectField"; $j; "property_byteArray"; "[B"; Java Test::TestContainer) ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "set property failed" ]
                                  • End If
                                  • Set Variable [ $r; Value:MBS( "Java.SetContainerFileName"; "Logo.png" ) ]
                                  • Set Variable [ $r; Value:MBS( "Java.GetObjectField"; $j; "property_byteArray"; "[B") ]
                                  • If [ MBS("IsError") ]
                                  • Show Custom Dialog [ Title: "Java Error"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  • Exit Script [ Result: "get property failed" ]
                                  • Else
                                  • Set Field [ Java Test::ContainerResult2; $r ]
                                  • End If
                                  • #Cleanup and Finish
                                  • Set Variable [ $r; Value:MBS( "Java.Release"; $j) ]
                                  • Show Custom Dialog [ Title: "Java Success"; Message: "All tests okay"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                  Fields used in this script
                                  Scripts used in this script
                                    Layouts used in this script
                                      Tables used in this script
                                      Table occurrences used by this script
                                      Custom Functions used by this script
                                        Custom menu set used by this script

                                          Previous Script: [Tests]Next Script: [Clear Fields]
                                          Script NameStart
                                          Run script with full access privilegesOff
                                          Include In MenuYes
                                          Layouts that use this script
                                            Scripts that use this script
                                              Script Definition
                                              Script Steps
                                              • #Locate jar file in same folder as database. (will not work on Server!)
                                              • Set Variable [ $databasePath; Value:Get(FilePath) ]
                                              • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                                              • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                                              • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                                              • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "tests.jar" ) ]
                                              • Set Field [ Java Test::ClassPath1; $path ]
                                              Fields used in this script
                                              Scripts used in this script
                                                Layouts used in this script
                                                  Tables used in this script
                                                  Table occurrences used by this script
                                                  Custom Functions used by this script
                                                    Custom menu set used by this script

                                                      Previous Script: [Start]
                                                      Script NameClear Fields
                                                      Run script with full access privilegesOff
                                                      Include In MenuYes
                                                      Layouts that use this script
                                                        Scripts that use this script
                                                          Script Definition
                                                          Script Steps
                                                          • Set Field [ Java Test::Path to Java Library; "" ]
                                                          • Set Field [ Java Test::ClassPath1; "" ]
                                                          Fields used in this script
                                                          Scripts used in this script
                                                            Layouts used in this script
                                                              Tables used in this script
                                                              Table occurrences used by this script
                                                              Custom Functions used by this script
                                                                Custom menu set used by this script

                                                                  Download example: Java Tests

                                                                  Used functions:




                                                                  Links
                                                                  MBS Xojo PDF Plugins