hello, i have developed an application in java for linux i need to install it in linux in my system(ubuntu 10.04) and how to make executable for linux .i have the application as jar file
You can create a simple shell script that run the following command:
java -jar mylib.jar
and then run the script using ./myscript.sh
echo "java -jar filename.jar" > runme.sh && chmod +x runme.sh
./runme.sh
If you're targeting a different machine from the one you've developed on, you'll need to package your JAR into a .deb
file and either include a JRE/JDK in the distribution, or else declare a dependency on one of the apt
packaged Java distros so that apt-get
installs Java at the same time as your application.
For Java applications with a GUI, look into Java Web Start.
I never had much luck getting menu items to work on Ubuntu Linux, but desktop shortcuts were no problem. Maybe you can specify the exact sub-menu that the menu item is to appear under, and it will work.
JWS also works for Windows and Mac.
Follow this article and you need to create a file with gedit and name it with your package name.(e.g totem for totem media player listed in Applications Sound & Video) then in that file enter these lines and save to Input directory (mentioned in the above tutorial)
?package(yourpackagename):needs="X11" \
section="Applications/Sound" \
title="yourpackagename" \
command="/usr/bin/yourpackagename" \
icon="/usr/share/pixmaps/yourpackageicon"
enter your package name accordingly. Icon line is optional you can omit it. then
debian/input/yourpackagename /usr/share/menu/yourpackagename
add this line to install file there we are adding the above created file into /usr/share/menu dir