Hacker News new | ask | show | jobs
by ohyesyodo 4273 days ago
Source for that?
2 comments

Yeah, the OP[1]. A lot of the returned results are Java code, alternatively there's also [2].

[1] https://searchcode.com/?q=if%28version%2Cstartswith%28%22win...

[2] http://docs.oracle.com/javase/tutorial/essential/environment...

No. He said that it was the 'default' way of doing it. Yes, it has happened X times, that does not mean it's the default way of doing it. Maybe there's some other method which is done a lot more often and hence should be considered the 'default' way.
System.getProperty("os.name")