title: How to get the battery power level in % in Java in a platform independent way?
body: <p>How to get the battery power level in % in Java in a platform independent way?</p>
  
  <p>There is already a question for Windows for this: <a href="https://stackoverflow.com/q/3434719/1590323">How to get the remaining battery life in a Windows system?</a></p>
  
  <p>And for Mac: <a href="https://stackoverflow.com/q/1632365/1590323">Get battery level in Java</a></p>
  
  <p>But <strong>how can I do it in a platform-independent way, so it works on Windows, Mac, Linux, and maybe other platforms too?</strong></p>