assuming you must write your library in java, your choices are:
1) inline java with a javaobject
2) build the library with the simple library compiler
using the simple library compiler is beyond the scope of this reply (search "simple library
compiler" in the search box above right).
but for inline java, here is 1 way to do it. (attached image shows result).
Dim jo As JavaObject
jo.InitializeNewInstance(Application.PackageName & ".main$Utils",Null)
jo.RunMethod("test",Null)
#If Java
public static class Utils {
public void test(){
BA.Log("I'm doing something, just like you wanted.");
}
}
#End If
note:this solution works for
this particular case. if you change your code, you may need a
different solution. in other words, if you change your code, please don't say, "it doesn't work".
the solution works for this case. start a new thread if you make changes.
in order to use "File.delete", etc, you'll need to use the simple library compiler. use of the javaobject will achieve the same result. you could also write your library in b4x.