I'm creating a swing app that needs root permission. It works well under netbeans, because I gave root permission to netbeans, under lubuntu, but when I run the jar by double clicking, it does not work. I also tried giving root permissions to the jar file, by creating a desktop shortcut, and I edited the shortcut, and added gksudo on exec. It asks for the password, but my app still does not work. I also tried right clicking the jar, and then on permissions, where it says root, it is grayed out.
Can someone please help me?
I just don't know if I should add some piece of code to my app, so it asks for root permissions when it executes or give root permissions to the jar, and if so how can I give root permissions to the jar if I can't edit its properties. I need this to work by double clicking the jar and not through the teminal.
Thanks.