Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9138249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:13:55+00:00 2026-06-17T09:13:55+00:00

I am currently working on creating a nifty utility that will beep once the

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:13:55+00:00Added an answer on June 17, 2026 at 9:13 am

    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 ?

    No, the code is ready as-is. The javadoc comment merely describes method’s own sole job.


    and how do I drop jna.jar from classpath ? (and I don’t even know what that means).

    The classpath is a collection of disk file system paths to folders containing .class files and/or disk file system paths to individual JAR files containing .class files where Java has to lookup when it needs to load a class for compile or runtime.

    Where and how exactly to configure the classpath in turn depends on how you’re executing the Java application. E.g. in command console, in an IDE, as a web applciation, etc.


    I am using eclipse. I think first I will have to include the jar file as an import to the project

    If it’s a “plain vanilla” Java applicaiton project and you’re executing a main() method in Eclipse by (Ctrl)F11, then you need to drop the JAR file just straight in the project root folder, rightclick it and choose Build Path > Add to Build Path. That’s it. You can manage them all in Java Build Path entry of project’s properties.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on creating a new C# project that needs to interact with
I am currently working on a project that involves creating a questionnaire from a
I'm currently working on an app that allows the user to play (automatically scroll)
I'm currently working on an application that will generate actual .cs and .xaml code
I'm currently working on a small utility program that only requires a command line
I'm currently working on creating electronic version of various request forms. Each form will
I'm currently working on an assignment that has me creating a Map class in
I'm working on a project in C that involves creating a user-level thread library
I'm currently working on creating a website that needs to access the text stored
I am currently working on creating a header file that acts like the standard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.