System sleep listener and library path
in
Integration and Hardware
•
1 year ago
Hi, I have two questions. I want to add an systemsleeplistener, so how do I do this?
-
class newClass implements SystemSleepListener{void systemAboutToSleep(AppEvent.SystemSleepEvent e){println("sleep");}void systemAwoke(AppEvent.SystemSleepEvent e){println("awake");}}
And how do I get the library path for the use of exec
- File workingDir = new File("path");
- String commandToRun = "file"+argu;
- Process p = Runtime.getRuntime().exec(commandToRun, null, workingDir);
I just don't get the right result with that. I've allready tried file.getAbsolutePath(); and other methods.
1