Doing so would probably require greater system privileges than the user.
Another alternative is to package your keylogger into an .exe (check out the B4JPackager tutorial) and give it the same name and description as a system process like conhost or cmd or taskhost (for Windows). There are typically more than one instance of those processes running so an extra one won't necessarily look out of place. You'll want to make sure that you choose a system process with a similar CPU/RAM usage profile as your keylogger so that your keylogger process doesn't look out of place to the astute user. This won't make it forbidden to kill the keylogger but it will hide the keylogger from the user.