10 messages in net.java.dev.jna.usersRe: Kernel32 Waking Hibernating Machine
FromSent OnAttachments
Dale...@coats.comApr 24, 2008 6:34 pm 
Dale...@coats.comApr 28, 2008 5:01 pm 
Timothy WallApr 29, 2008 10:13 am 
Dale...@coats.comApr 30, 2008 9:24 am 
Dale...@coats.comApr 30, 2008 10:10 am 
Timothy WallMay 1, 2008 5:58 am 
Dale...@coats.comMay 1, 2008 7:37 am 
Timothy WallMay 1, 2008 8:07 am 
Timothy WallMay 1, 2008 8:35 am 
Dale...@coats.comMay 1, 2008 10:12 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Kernel32 Waking Hibernating MachineActions...
From:Dale...@coats.com (Dale@coats.com)
Date:Apr 30, 2008 9:24:57 am
List:net.java.dev.jna.users

Tim,

Thanks for the reply.

The JVM pays attention when I ask it to sleep using (whatever the win32 'sleep now' command is) through JNA. The problem is that it rumpelstiltskins on me; I can never get it to wake up.

I searched "JVM" and "OS signals", but all I found were things that were stopping the JVM or ignoring OS signals, whereas I want to resume the JVM and pay attention to OS signals! It was really lonely in the world of "JVM" and "SetWaitableTimer".

But the good news is that I've got some JNI stuff working now. I didn't want to go that route, but it looks like the only option.

--Dale--

On Tue, 29 Apr 2008 13:14:09 -0400 Message from Timothy Wall <twal@dev.java.net>

You might check to see if the VM itself is set up to respond to any OS signals (like sleep). There is also an -Xrs switch to the VM to reduce the VM's use of OS signals.

You should also check to see if there are any "minor" wake from sleep dependencies or requirements that you might have overlooked in the w32 api.

Other than having more dependent dlls, I don't see any difference between your mapping and a simple C program.

On Apr 28, 2008, at 8:01 PM, Dale@coats.com wrote:

This same technique works when coded in C language, so I think it must be something different in the way JNA handles it.