JShellLink link = new JShellLink();
link.setFolder(JShellLink.getDirectory("desktop"));
link.setName("Peptide Shaker " + PeptideShaker.getVersion());
link.setIconLocation(iconFileLocation);
link.setPath(jarFileLocation);
link.save();
} catch (Exception e) {
System.out.println("An error occurred when trying to create a desktop shortcut...");
e.printStackTrace();
}
}