I am currently working on creating a nifty utility that will beep once the laptop's battery is at 55% or at whatever percent the user wants to get notified.
I was told that Java does not provide any access to this information and for that I will need to use JNA(Java Native Access)
by Todd Fast.
I got the jna.jar file downloaded but I don't know what to do next to create that software.
I was helped by a community member who created a code that does just that and it is here:
How to get the remaining battery life in a Windows system?
In the code he leaves a comment Fill The Structure
. This is where I get confused. The fill will have to be a class that implements the interface that was mentioned ?
and how do I drop jna.jar
from classpath ? (and I don't even know what that means).
I am using eclipse. I think first I will have to include the jar file as an import to the project. Guidance please.