Can I design my program so t开发者_如何学Pythonhat it will automatically change OS's hotkeys parameters? I mean, when installing a program, it will set the hotkey of OS so that if you press them, the program itself would run. (Linux/Windows)
It is possible on Windows if you use the Win32 API. This would work if you create an application in c++ for example which waits for a keyboard input, checks it and calls your java program if the hotkey was pressed. But I don't know any way to do this on Linux or in Java directly.
If your app. has a GUI & you can distribute from a web site, look into Java Web Start. JWS does not provide the 'hotkey' functionality specifically, but can install desktop shortcuts and menu items for Java applications. JWS works on platforms which support Java.
精彩评论