![]() ![]() I tested this with the following code (note a few modifications, as the OP code had some "bugs"): import This way, the gradle daemon (a java process) will be responsible for running the application and proper permissions will be detected by macOS. If you're like me, you use gradle anyway for java projects in IntelliJ, and all you have to do is remember to run your project from the command line before running it from IntelliJ. This process is using java and java has permission to move the mouse cursor in macOS system preferences. What happens: IntelliJ, in step 6, uses the already running gradle daemon process to execute your application. Run IntelliJ and run your app as a gradle project through IntelliJ, and voila!. ![]() macOS will prompt to give permissions, open system preferences and give java permission.Run you application from the command line using Gradle.Be sure all Gradle daemons are stopped (or if you haven't run Gradle yet, then be sure the next step is the first time gradle runs since you last rebooted your computer). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |