create a simple .desktop file in ~ / .local / share / applications /
vim ~/.local/share/applications/application_name.desktop
add these entries to the file
[Desktop Login]
Name = your application name
Comment =
Exec = java -jar program.jar
Icon = / path / to / icon
Terminal = false
Type =
Application StartupNotify = true
you will need to exit and return for the changes to take effect.
source share