简体   繁体   中英

How to create .deb package from JavaFx project?

I wan't to create installer for my JavaFx application project (.deb package). I discovered that this can be done using intellij, but It's not working for my project. Deb package is created, but after installation my app is not running. Besides I wan't to customize this package. From the main debian page I read that I need to create a "control" file and with dpkg-deb --build I can create a package. But I don't know how to configure the "control" file and how to connect it all to the Main.java boot class or to the generated jar file. I'm looking for tips or advise how to do it best.

I used intellij to create a.deb package with it, but should this package be that big? (67MB) It is around 250MB to install. My.jar file with dependencies weighs 1.9MB. I have looked at this package and there are various libraries through which this package weighs so much (mainly amd64 and ext):

 ── lib
│   ├── amd64
│   │   ├── jli
│   │   │   └── libjli.so
│   │   ├── jvm.cfg
│   │   ├── libattach.so
│   │   ├── libavplugin-53.so
│   │   ├── libavplugin-54.so
│   │   ├── libavplugin-55.so
│   │   ├── libavplugin-56.so
│   │   ├── libavplugin-57.so
│   │   ├── libavplugin-ffmpeg-56.so
│   │   ├── libavplugin-ffmpeg-57.so
│   │   ├── libavplugin-ffmpeg-58.so
│   │   ├── libawt_headless.so
│   │   ├── libawt.so
│   │   ├── libawt_xawt.so
│   │   ├── libbci.so
│   │   ├── libdcpr.so
│   │   ├── libdecora_sse.so
│   │   ├── libdeploy.so
│   │   ├── libdt_socket.so
│   │   ├── libfontmanager.so
│   │   ├── libfxplugins.so
│   │   ├── libglassgtk2.so
│   │   ├── libglassgtk3.so
│   │   ├── libglass.so
│   │   ├── libglib-lite.so
│   │   ├── libgstreamer-lite.so
│   │   ├── libhprof.so
│   │   ├── libinstrument.so
│   │   ├── libj2gss.so
│   │   ├── libj2pcsc.so
│   │   ├── libj2pkcs11.so
│   │   ├── libjaas_unix.so
│   │   ├── libjava_crw_demo.so
│   │   ├── libjavafx_font_freetype.so
│   │   ├── libjavafx_font_pango.so
│   │   ├── libjavafx_font.so
│   │   ├── libjavafx_iio.so
│   │   ├── libjava.so
│   │   ├── libjawt.so
│   │   ├── libjdwp.so
│   │   ├── libjfr.so
│   │   ├── libjfxmedia.so
│   │   ├── libjfxwebkit.so
│   │   ├── libjpeg.so
│   │   ├── libjsdt.so
│   │   ├── libjsig.so
│   │   ├── libjsoundalsa.so
│   │   ├── libjsound.so
│   │   ├── liblcms.so
│   │   ├── libmanagement.so
│   │   ├── libmlib_image.so
│   │   ├── libnet.so
│   │   ├── libnio.so
│   │   ├── libnpt.so
│   │   ├── libprism_common.so
│   │   ├── libprism_es2.so
│   │   ├── libprism_sw.so
│   │   ├── libresource.so
│   │   ├── libsaproc.so
│   │   ├── libsctp.so
│   │   ├── libsplashscreen.so
│   │   ├── libsunec.so
│   │   ├── libt2k.so
│   │   ├── libunpack.so
│   │   ├── libverify.so
│   │   ├── libzip.so
│   │   └── server
│   │       ├── libjsig.so
│   │       ├── libjvm.so
│   │       └── Xusage.txt
│   ├── calendars.properties
│   ├── charsets.jar
│   ├── classlist
│   ├── cmm
│   │   ├── CIEXYZ.pf
│   │   ├── GRAY.pf
│   │   ├── LINEAR_RGB.pf
│   │   ├── PYCC.pf
│   │   └── sRGB.pf
│   ├── content-types.properties
│   ├── currency.data
│   ├── deploy.jar
│   ├── ext
│   │   ├── cldrdata.jar
│   │   ├── dnsns.jar
│   │   ├── jaccess.jar
│   │   ├── jfxrt.jar
│   │   ├── localedata.jar
│   │   ├── meta-index
│   │   ├── nashorn.jar
│   │   ├── sunec.jar
│   │   ├── sunjce_provider.jar
│   │   ├── sunpkcs11.jar
│   │   └── zipfs.jar
│   ├── flavormap.properties
│   ├── fontconfig.bfc
│   ├── fontconfig.properties.src
│   ├── fontconfig.RedHat.5.bfc
│   ├── fontconfig.RedHat.5.properties.src
│   ├── fontconfig.RedHat.6.bfc
│   ├── fontconfig.RedHat.6.properties.src
│   ├── fontconfig.SuSE.10.bfc
│   ├── fontconfig.SuSE.10.properties.src
│   ├── fontconfig.SuSE.11.bfc
│   ├── fontconfig.SuSE.11.properties.src
│   ├── fontconfig.Turbo.bfc
│   ├── fontconfig.Turbo.properties.src
│   ├── fonts
│   │   ├── fonts.dir
│   │   ├── LucidaBrightDemiBold.ttf
│   │   ├── LucidaBrightDemiItalic.ttf
│   │   ├── LucidaBrightItalic.ttf
│   │   ├── LucidaBrightRegular.ttf
│   │   ├── LucidaSansDemiBold.ttf
│   │   ├── LucidaSansRegular.ttf
│   │   ├── LucidaTypewriterBold.ttf
│   │   └── LucidaTypewriterRegular.ttf
│   ├── hijrah-config-umalqura.properties
│   ├── images
│   │   ├── cursors
│   │   │   ├── cursors.properties
│   │   │   ├── invalid32x32.gif
│   │   │   ├── motif_CopyDrop32x32.gif
│   │   │   ├── motif_CopyNoDrop32x32.gif
│   │   │   ├── motif_LinkDrop32x32.gif
│   │   │   ├── motif_LinkNoDrop32x32.gif
│   │   │   ├── motif_MoveDrop32x32.gif
│   │   │   └── motif_MoveNoDrop32x32.gif
│   │   └── icons
│   │       ├── sun-java_HighContrastInverse.png
│   │       ├── sun-java_HighContrast.png
│   │       ├── sun-java_LowContrast.png
│   │       └── sun-java.png
│   ├── javafx.properties
│   ├── javaws.jar
│   ├── jce.jar
│   ├── jexec
│   ├── jfr
│   │   ├── default.jfc
│   │   └── profile.jfc
│   ├── jfr.jar
│   ├── jfxswt.jar
│   ├── jsse.jar
│   ├── jvm.hprof.txt
│   ├── locale
│   │   ├── de
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── es
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── fr
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── it
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── ja
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── ko
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── ko.UTF-8
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── pt_BR
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── sv
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── zh
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── zh.GBK
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── zh_HK.BIG5HK
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   ├── zh_TW
│   │   │   └── LC_MESSAGES
│   │   │       └── sunw_java_plugin.mo
│   │   └── zh_TW.BIG5
│   │       └── LC_MESSAGES
│   │           └── sunw_java_plugin.mo
│   ├── logging.properties
│   ├── management
│   │   ├── jmxremote.access
│   │   ├── jmxremote.password.template
│   │   ├── management.properties
│   │   └── snmp.acl.template
│   ├── management-agent.jar
│   ├── meta-index
│   ├── net.properties
│   ├── oblique-fonts
│   │   ├── fonts.dir
│   │   ├── LucidaSansDemiOblique.ttf
│   │   ├── LucidaSansOblique.ttf
│   │   ├── LucidaTypewriterBoldOblique.ttf
│   │   └── LucidaTypewriterOblique.ttf
│   ├── plugin.jar
│   ├── psfontj2d.properties
│   ├── psfont.properties.ja
│   ├── resources.jar
│   ├── rt.jar
│   ├── security
│   │   ├── blacklist
│   │   ├── blacklisted.certs
│   │   ├── cacerts
│   │   ├── java.policy
│   │   ├── java.security
│   │   ├── javaws.policy
│   │   ├── policy
│   │   │   ├── limited
│   │   │   │   ├── local_policy.jar
│   │   │   │   └── US_export_policy.jar
│   │   │   └── unlimited
│   │   │       ├── local_policy.jar
│   │   │       └── US_export_policy.jar
│   │   └── trusted.libraries
│   ├── sound.properties
│   └── tzdb.dat

these libraries are necessary, can I somehow reduce the size of this file?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM