0
  • 我使用 javafx 构建了一个小应用程序(非常基本的东西)
  • 使用 javac 编译:OK (oracle jdk 1.8.0_201-b09)
  • 装箱:好的:jar 与 java -jar 一起工作正常
  • 使用 javapackager 打包应用程序

    javapackager \ -deploy \ -daemon \ -srcfiles $JAR_FILE:./lib/$LIB_JAR.jar \ -outdir $DIST_FOLDER \ -outfile dist \ -native deb \ -appclass com.myapp.client.gui.Main \ -name "我的应用程序”\-标题“我的应用程序”\-v

  • 运行生成的 deb 安装程序(同一台机器)

  • 去 /opt/MyApp 下已安装的应用程序,当我运行它时,MyApp它只是抱怨GLIBCXX_3.4.21找不到

我已经尝试了各种适当的修复,但没有任何效果..

值得一提的是,这一切都是在从虚拟机运行的全新 ubuntu 桌面版本中完成的。(Ubuntu 14.04.1 amd64)

4

1 回答 1

0

尝试使用 jdk8u181 或更少。jdk 提供的启动器(在 lib/ant-javafx.jar -> ./com/oracle/tools/packager/linux/JavaAppLauncher 中)没有相同的符号表。它看起来像 oracle 的 jdk 编译和分发系统中的一个错误。

$ objdump -T 181/./com/oracle/tools/packager/linux/JavaAppLauncher

181/./com/oracle/tools/packager/linux/JavaAppLauncher:     format de fichier elf64-x86-64

DYNAMIC SYMBOL TABLE:
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSsaSEPKc
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dirname
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSsC1Ev
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 printf
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSspLEPKc
0000000000000000  w   D  *UND*    0000000000000000              __gmon_start__
0000000000000000  w   D  *UND*    0000000000000000              _Jv_RegisterClasses
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNKSs5c_strEv
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _Znam
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 __libc_start_main
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSsD1Ev
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlclose
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSsC1EPKcRKSaIcE
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 readlink
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSaIcED1Ev
0000000000000000  w   D  *UND*    0000000000000000              __pthread_key_create
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZdaPv
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlopen
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlsym
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 setlocale
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSaIcEC1Ev
0000000000000000      DF *UND*    0000000000000000  GCC_3.0     _Unwind_Resume
0000000000400a50      DF *UND*    0000000000000000  CXXABI_1.3  __gxx_personality_v0


$ objdump -T 191/./com/oracle/tools/packager/linux/JavaAppLauncher

191/./com/oracle/tools/packager/linux/JavaAppLauncher:     format de fichier elf64-x86-64

DYNAMIC SYMBOL TABLE:
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dirname
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 printf
0000000000000000  w   D  *UND*    0000000000000000              __gmon_start__
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _Znam
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 __libc_start_main
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlclose
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 readlink
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSaIcED1Ev
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZdaPv
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlopen
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 dlsym
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv
0000000000000000      DF *UND*    0000000000000000  GLIBC_2.2.5 setlocale
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4 _ZNSaIcEC1Ev
0000000000000000      DF *UND*    0000000000000000  GCC_3.0     _Unwind_Resume
0000000000000000      DF *UND*    0000000000000000  GLIBCXX_3.4.21 _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc
0000000000400be0      DF *UND*    0000000000000000  CXXABI_1.3  __gxx_personality_v0
于 2019-02-11T15:44:04.430 回答