tags:

views:

78

answers:

6

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

A: 

You can create a simple shell script that run the following command:

java -jar mylib.jar

and then run the script using ./myscript.sh

romaintaz
rajesh
+4  A: 
echo "java -jar filename.jar" > runme.sh && chmod +x runme.sh

./runme.sh
Jack
I don't know much of the shell scripting, but if it works then this is what user is asking for!
JavaGeek
+4  A: 

This and this.

Ignacio Vazquez-Abrams
The second *this*.
Ashish
https://foss.in/2007/register/slides/Packaging_Java_Applications_for_Ubuntu_Platform_478.pdf
starblue
A: 

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.

dty
A: 

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.

Andrew Thompson
A: 

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

Keshan