Try this code to get the system environment.
Maybe something will be useful to you in the results.
B4J:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
Dim SystemEnvironment As Map = getSystemEnvironment
For Each Key As String In SystemEnvironment.Keys
Log($"${Key} = ${SystemEnvironment.Get(Key)}"$)
Next
End Sub
Sub getSystemEnvironment As Map
Dim jo As JavaObject
jo.InitializeStatic("java.lang.System")
Dim Env As Map = jo.RunMethod("getenv", Null)
Return Env
End Sub
walt61, that seems to be what i'm after, the extended file attributes. the owner is about the best i can do i believe. its been awhile since i worked in b4j and i'm going to have to figure out how to apply the jar file you mentioned and apply it. but it looks right. thanks.
i've added the jar and xml to my additional lib folder, i have checked it on in the library manager. but i still don't know how to use it. do you have example code ? do i declare a class of some sorts ? then use it ? seems like i should declare a variable to hold the info. then call a method to get the info.
Just had a look at the codeproject page on which the library is based and it seems it looks for the owner by shelling 'cmd'. I couldn't test it, but have the impression that this should work (it does for e.g. property AbsolutePath; I'm on Linux with Wine, and don't have a 'cmd' there):
B4X:
Dim fp As fileproperties
fp.FileInfo("C:\test.txt") ' This appears to be the equivalent of the trusted 'Initialize' method
Log(fp.Owner)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.