Convert .jar to .deb package

14,335

you can create a DEB from .jar file.

You have to add following code to your pom.xml file

<build>
    <groupId>org.test</groupId>
    <artifactId>some-lib</artifactId>
    <version>1.0</version>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>deb-maven-plugin</artifactId>
        <configuration>
          <description>A test project</description>
              <maintainer>Tim OBrien &lt;[email protected]&gt;</maintainer>
              <section>libs</section>
              <priority>optional</priority>     
              <architecture>all</architecture>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>deb</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>

and after that running

mvn package

will gives your a .DEB file.

For more information you must read this : http://mojo.codehaus.org/deb-maven-plugin/using-deb.html

Share:
14,335

Related videos on Youtube

user272954
Author by

user272954

Updated on September 18, 2022

Comments

  • user272954
    user272954 10 months

    My project is to develop an installer which is an executable for Windows, Mac and Ubuntu. The executables on Windows, Mac and Ubuntu are .exe, .app and .deb respectively. So, I converted my .jar file to a .exe file on Windows using a software called launch4j. And on MAC I used a software called Jar-Bundler to convert my jar in to .app file. I want to know if there is any specific software on Ubuntu to convert my jar file in to a .deb file.

    • Admin
      Admin about 9 years
      Ya .But I want it to be converted to an executable probably .deb file which is my requirement.For example on windows I used launch4j software to convert the .jar file to .exe file and on mac I used Jar-Bundler software to convert .jar to .app file.
    • Admin
      Admin about 9 years
      Ok then consider editing your question to clarify what you are asking. On a side note, why do you want to make an installer for a java program ? One of the strong side about this language is that it is cross platform. If you keep your jar file, it could be run on either windows, ubuntu, or OSX, without any modification
    • Admin
      Admin about 9 years
      I would say that your question mainly refers to packaging: having a jar file is just an element of the package. So, consider using "packaging" keyword for looking into this site, for example: askubuntu.com/questions/1345/…
  • wanderer0810
    wanderer0810 over 5 years
    This link doesn't work for me anymore