Click here to Skip to main content
15,945,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Member 10850253 20-Apr-15 10:57am    
I found what was the problem and it is not the root access. The problem is that it is not including the external libraries when I build the jar file. I found this:
and it says there, that I can add some code to the bottom of the build.xml, but it still does not work. I added the library by going to tools and I also added a javadoc, because it is required and then added that in the app properties, I don't know if that makes a difference. Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900