B4J Question GetSystemProperty "os.name" and "os.version" not working for Windows 11

m4.s

Member
Licensed User
Longtime User
I provide system info in my B4J application, and ever since I upgraded to Windows 11 I'm still getting "Windows 10" and "10.0" returned values, respectively - even though my developer laptop's Windows System info shows/displays this:

OS Name Microsoft Windows 11 Pro
Version 10.0.22593 Build 22593

My simple code is:

B4X:
Dim strSystemInfo = "{ B4J v9.30 / JRE v" & GetSystemProperty("java.version","-unknown") & " / " & GetSystemProperty("os.name","-unknown")  & " OS v" & GetSystemProperty("os.version","-unknown") & " }"


Any reason why? Note, in case it's important, that I upgraded from Windows 10 to Windows 11 via the MS Windows Insider Program (first choosing Dev Channel and now the Beta Channel).

*Also, might there be a way to also dynamically gather the B4J compiler version (so no hard-coded value is necessary) from a running B4J application?
 

William Lancee

Well-Known Member
Licensed User
Longtime User
On my Windows 11 system, the result is the same. I have no idea how to fix it.

You can get the B4J version from the file in this location C:\Users\YOURUSERNAME\AppData\Roaming\Anywhere Software\B4J\b4xV5.ini

B4X:
{ B4J v9.30 / JRE v11.0.1 / Windows 10 OS v10.0 }
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I have posted a code snippet here:
 
Upvote 0
Top