I have a windows desktop application written on Java. I have a checkbox there saying "Launch at system startup". So if this checkbox is checked then I want the app to start when a user logs in to Windows. And if it's not checked then I want to remove it (If it already exists).
And I want to do it from my application using Java (I know there are some other methods like batch file and windows service).
I have checked Stack Overflow code but it didn't work. Actually I just want a solution like Code Project.
But unfortunately it's in C# .net. So how can I achieve this using Java?
EDIT: I am also open for JNA/JNI approach. The thing is I just need to do it in Java. And it doesn't matter whatever I am using. I am ready to go for JNA/JNI.