The question about Make jar to ask for admin rights when it is launched
This question already has an answer here:
Solution to Make jar to ask for admin rights when it is launched
You can’t make the jar ask for admin access.
Instead, create a shortcut to
java.exe -jar myjar.jar, then edit the shortcut properties, click the “Advanced…” button and check “Run as administrator“.
Now, double-clicking the shortcut to run your jar file will always run as administrator.