How to detect operating system in Java
In the following article, there is a short Java snippet that can be used to read the operating system of the computer running the Java program.
In addition, it is the first Java snippet at all here in the blog. Although I have been writing a few lines of Java code again and again for a couple of years, I really couldn’t befriend myself (especially with regard to my C # passion) with Java so far yet. But since I have to deal more and more with Java on the job, however, this will soon be reflected in the blog. But let’s come to the Snippet now…
Read operating system in Java
In order to identify the computer’s operating system in Java, the getProperty-method of the system-class is suitable. […]
For some time, I was plagued by a small, but not less annoying, issue on Windows 10. The system time drifted intermittently one hour off. A manual changeover of the time brought success only in the short term. After a while the clock went wrong again.
Recently, I bought a netbook for my workshop to control a laser engraver (the DK-8 from Neje). Unfortunately, I had overlooked a small detail. The display of the netbook has only a native resolution of 1,024 x 600 pixels. However, the window of the control software requires at least 800 pixels in height, so that some of the software is not visible and thus can not be operated.