Lets not give up so soon!
Don't have it in front of me now, but its part of the support for the vista/w7 sidebar. sidebar.exe is also a COM automation / activeX server that gives access to stuff that sidebar gadgets like to display, and battery power info is in there as well. I found jscript gadget examples that accessed System.Machine.PowerStatus.batteryPercentRemaining from that COM interface.
I guess the rest is just plumbing, although there's maybe some implicit bit of initialisation that Gadgets have that will also be needed.
Managed to get some tips from the c forum and It can be done using java,especially using linux.
all u need to do is access the file state from /proc/acpi/ac_adapter/ACAD/ and use the information you read from the file to check if ac power is plugged in or not,u'll just use simple if statements,thank you all for your contribution
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...