Run jar file from bat file
You need an executable jar file. See how to create a jar file
Once your jar file is ready.
Step 1: Create a bat file with any name.
Step 2: Write the following line in your bat file.
start javaw -jar Drive:\\AutoRun.jar
If you want to hold the black screen. Use the following code
javaw -Xmx200m -jar Drive:\\AutoRun.jar
Now run the bat file and it will start you jar file