Just to be clear - a jar is not an executable. Even when it is an "execuable jar" it still isn't an executable.
What executes is java (java.exe on windows.) And a jar cannot change java.exe. So something besides your jar must do what you want. You can create a wrapper (with JNI) that does what you want. Or find a external application that does the same.
Can you suggest a way how to create a wrapper (with JNI) in java for a jar.
A simple google search turns up some great suggestions, especially in StackOverflow answers.