https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
x

xxfast

06/06/2021, 3:25 AM
Is there a way to get what system we are on and its version in `desktopMain`/`jvmMain`?
d

Dominaezzz

06/06/2021, 7:52 AM
Any Java method to do so will suffice.
x

xxfast

06/06/2021, 7:59 AM
sorry, what do you mean?
Found these online
Copy code
System.getProperty("os.name");
System.getProperty("os.version");
but looks like some versions of windows don’t abide by these system properties
d

Dominaezzz

06/06/2021, 8:10 AM
Kotlin doesn't have any special way. You just have to call Java APIs.
x

xxfast

06/06/2021, 8:11 AM
fair enough - i guess these will do for now