G gerredtor Active Member Licensed User Apr 6, 2016 #1 Hello with this code: B4X: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale") Log(jo.RunMethod("getDisplayLanguage()", Null)) i become this error: B4X: java.lang.RuntimeException: Method: getDisplayLanguage() not found in: java.util.Locale but this is a method of locale
Hello with this code: B4X: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale") Log(jo.RunMethod("getDisplayLanguage()", Null)) i become this error: B4X: java.lang.RuntimeException: Method: getDisplayLanguage() not found in: java.util.Locale but this is a method of locale
DonManfred Expert Licensed User Longtime User Apr 6, 2016 #2 the method is getDisplayLanguage not getDisplayLanguage() Upvote 0
G gerredtor Active Member Licensed User Apr 6, 2016 #3 with getDisplayLanguage i become this error: B4X: java.lang.IllegalArgumentException: Expected receiver of type java.util.Locale, but got java.lang.Class<java.util.Locale> Upvote 0
with getDisplayLanguage i become this error: B4X: java.lang.IllegalArgumentException: Expected receiver of type java.util.Locale, but got java.lang.Class<java.util.Locale>
Erel B4X founder Staff member Licensed User Longtime User Apr 7, 2016 #4 It is not a static method. B4X: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale") Log(jo.RunMethodJO("getDefault", Null).RunMethod("getDisplayLanguage", Null)) Upvote 0
It is not a static method. B4X: Dim jo As JavaObject jo.InitializeStatic("java.util.Locale") Log(jo.RunMethodJO("getDefault", Null).RunMethod("getDisplayLanguage", Null))