I tried creating a normal shortcut, and a javaw.exe shortcut, which creates the context menu option "Pin to Start", but that does nothing.
I had to do something similar to get another application to pin to taskbar I use so I knew it had something to do with targets, and after researching a bit the same method for Windows 7 works here.
Create a shortcut for your .JAR, then right click and go to properties Edit the target to match this format:
%SystemRoot%\system32\cmd.exe /C "path to jar"
Source (except he recommends making a shortcut of cmd, I actually ran into issues for some reason)
Finally, pin your new shortcut to the taskbar by dragging it there. The icon will be the same as CMD but you can easily change it:
Hope this helps!
Create a shortcut of the jar. Add 'explorer' to the beginning of the target:
"C:\Users\joe\Documents\netbeans kalendar\dist\kalendar.jar" becomes: explorer "C:\Users\joe\Documents\netbeans kalendar\dist\kalendar.jar"
The shortcut executes without a cmd window appearing (it uses the explorer instead.) You can pin this to the taskbar, and change it's icon.
I know this is an old question, but I just found a better solution:
You can execute Java directly, passing it the JAR as an argument. Set your shortcut to the following path:
javaw -jar C:\Path\To\My\Program.jar
Additionally, specify the Start in path to
C:\Path\To\My if your Java program uses relative paths to reference external files.
javaw here instead of
java prevents an empty command window from being spawned.