Other [B4J]Please consider reporting this to the maintainers of anywheresoftware.b4j.object.JavaObject

MrKim

Well-Known Member
Licensed User
Longtime User
The following code:
B4X:
   Dim jo As JavaObject
   jo.InitializeStatic("java.awt.Toolkit")
   Dim toolkit As JavaObject = jo.RunMethod("getDefaultToolkit", Null)
   toolkit.RunMethod("beep", Null)
Generates this Log:
B4X:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by anywheresoftware.b4j.object.JavaObject (file:/C:/Program%20Files%20(x86)/Anywhere%20Software/B4J/Libraries/JavaObject.jar) to method sun.awt.windows.WToolkit.beep()
WARNING: Please consider reporting this to the maintainers of anywheresoftware.b4j.object.JavaObject
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
When running debug or compiled from the designer the message is generated just once, the first time the code is run. After that there is no error message.
And the Beep works.

The real issue is, when running as a stand-alone executable, it does NOT work (no beep), and without a try catch block the program closes.
The Beep is not that important to me, just letting you know.
 
Top