I am writing a java netbeans platform application that alerts end users when certain dates, conditions are met, etc... So I want to give the option when the end user installs the program of whether or not the program starts when they log into the computer or not. I also want to give the option in the program itself to change this preference later on, basically a way to toggle if it does or does not start up when they log into the computer. I have found only found two solutions online which are for Micosoft based systems that edit the registry or a plugin that costs 3k. Which neither of these solutions are what I am looking for.
I am just looking for java code that can add or remove a link to the program so it starts up when the user logs into their profile. Basically the same thing as you can do in Microsoft Windows where you can add or remove a link to the program in the Startup folder but will work on any OS. Which I don't know if there is such a solution but I hope there is or something close to it that doesn't alter the registry of the system.
So if anyone knows how I could write this code, where I could find it or what I should be looking for in my searches I would be very thankful.