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 8002333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:19:49+00:00 2026-06-04T16:19:49+00:00

OS X Lion still goes to sleep, even if programmatic mouse wiggles are being

  • 0

OS X Lion still goes to sleep, even if programmatic mouse “wiggles” are being periodically issued from a Java Robot (this is a standard approach to keeping machines from going to sleep and is documented elsewhere in stackoverflow, and it worked for me prior to OS X Lion).

Can anyone suggest an alternative approach, which does not require permission escalation, of keeping the machine awake from a Java application?

((The fallback solution is obviously to change the Energy Saving preferences so that the machine never sleeps, but we’d like to be smarter than that because requiring the machine to stay awake is the exception rather than the rule)).

  • 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-04T16:19:50+00:00Added an answer on June 4, 2026 at 4:19 pm

    It turns out that it is no longer possible to do this with pure-Java hacks, and one must resort to implementing a JNI I/O listener, the code of which would contain something like

    http://developer.apple.com/library/mac/#qa/qa1340/_index.html

    An alternative, if you can tolerate calling a command line tool, is to call pmset noidle in a daemon thread.

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

Sidebar

Related Questions

Currently on OSX 10.7 Lion openssl 0.9.8r is installed. This build is from Feb
I can't import wxPython on OSX Lion after installing wxPython from this package http://downloads.sourceforge.net/wxpython/wxPython2.9-osx-2.9.4.0-cocoa-py2.7.dmg
So I'm running Mac OSX Lion and I recently installed Eclipse IDE for Java
I just upgraded from SnowLeapord to Lion and now cannot create virtualenvs. I understand
Mac OS X 10.7.3 Lion, Ruby 1.9.2, Rails 3.2.2, Sass 3.2.3 Following this tutorial:
After upgrading to Lion I can still start MySQL via System Preferences -> MySQL
I'm trying to install cython on lion but this is what I get: $
I just updated from Snow Leopard to Lion, and from Xcode 4.2 for Snow
I recently upgraded to Mountain Lion from Snow Leopard, and in doing so threw
Just upgraded a MBP 2009 from Snow Leopard to Lion. MySQL seems to be

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.