Forums Register Login

How to identify the Operating System?

+Pie Number of slices to send: Send
Hey all,

I am trying to print the name of the OS which my Java program is running. For an example, if it runs in windows, it should print "Windows OS", if Linux "Linux OS" like wise. How can I identify the OS? Please help..
+Pie Number of slices to send: Send
System.getProperty("os.name")
+Pie Number of slices to send: Send
 

Tim Moores wrote:System.getProperty("os.name")



Thanks Tim. I really appreciate it Thanks again
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 658 times.
Similar Threads
java Threading mapped with LINUX / WINDOWS OS ?
Windows Look and Feel(urgent)
How to identify classpath separator for a specific OS
ZipException: Access is Denied
Printing
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 23:38:22.