B4J Question GetSystemProperty - whole key list?

Blitzer

New Member
Licensed User
log (GetSystemProperty ("whole key list", ""))

B4X:
'Non-UI application (console / server application)
#Region Project Attributes
    #CommandLineArgs:
    #MergeLibraries: True
#End Region

Sub Process_Globals
   
End Sub

Sub AppStart (Args() As String)
    Log(GetSystemProperty("os.name", ""))
    Log(GetSystemProperty("os.arch", ""))
    Log(GetSystemProperty("user.dir", ""))
    Log(GetSystemProperty("user.home", ""))
    Log(GetSystemProperty("AppData", ""))
    Log(GetSystemProperty("java.version", ""))
    Log(GetSystemProperty("java.home", ""))
    Log(GetSystemProperty("file.separator", ""))
End Sub

Is there a whole key list somewhere?

Blitzer
 
Last edited:

tchart

Well-Known Member
Licensed User
Longtime User

Attachments

  • GetSystemProperties.zip
    1.5 KB · Views: 274
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Another option:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Dim props As Map = GetSystemProperties
    For Each k As String In props.Keys
        Log($"${k}: ${props.Get(k)}"$)
    Next
End Sub

Sub GetSystemProperties As Map
    Dim jo As JavaObject
    jo = jo.InitializeStatic("java.lang.management.ManagementFactory").RunMethod("getRuntimeMXBean", Null)
    Dim m As JavaObject
    m.InitializeNewInstance("anywheresoftware.b4a.objects.collections.Map$MyMap", Null)
    m.RunMethod("putAll", Array(jo.RunMethod("getSystemProperties", Null)))
    Return m
End Sub
 
Upvote 0
Top