Create a desktop file for the java program, make it executable (right-click > properties > check ‘executable’ checkbox under the permissions tab). Then search for this program (the desktop file name) and it should show up and you can put it on the panel.