独立的javafx应用程序无法在ubuntu中运行:GLIBCXX_3.4.21

时间:2019-02-07 00:00:07

标签: java ubuntu javapackager self-contained

  • 我使用javafx构建了一个小应用程序(非常基本的东西)
  • 使用javac进行编译:确定(oracle jdk 1.8.0_201-b09)
  • 打开罐子:好的:罐子与java -jar正常工作
  • 使用javapackager打包了应用程序

      

    javapackager \   部署\    -守护程序\   -srcfiles $ JAR_FILE:./ lib / $ LIB_JAR.jar \   -outdir $ DIST_FOLDER \   -outfile dist \   -本机deb \   -appclass com.myapp.client.gui.Main \   -名称“ MyApp”   -标题“ MyApp” \   -v

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

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

我尝试了各种适当的修复程序,但没有任何效果。

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

1 个答案:

答案 0 :(得分: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