我正在使用适用于 linux 的JPackage (Java 14) 打包一个 Java 应用程序(称为 Jaikoz)。
java 应用程序有时必须调用名为fpcalc64的 ac 程序,在安装时它会存储在app文件夹中,但它只有rw权限
问题 1
有没有办法在安装过程中授予它执行权限?
问题2
即使我手动进入应用程序文件夹并使用chmod 777 fpcalc64
授予完全执行权限,它仍然无法运行并且我的Java程序抱怨它没有权限,即使我重新启动应用程序也会继续发生这种情况,这怎么可能?
例如
失败
Jul 4, 2020 11:17:46 AM: WARNING: Unable to retrieve an acoustic id for song 2 file /home/ubuntu/Downloads/RedSharp_-_Walk_in_the_row.mp3 because Cannot run program "/home/ubuntu/code/jthink/jaikoz/JaikozAppImage/jaikoz/lib/app/fpcalc64": error=13, Permission denied
但是如果我从 linux shell 运行它就可以了
ubuntu@ubuntu:~/code/jthink/jaikoz/JaikozAppImage/jaikoz/lib/app$ ls -l fpcalc*
-rwxrwxrwx 1 ubuntu ubuntu 2210876 Jul 4 11:15 fpcalc
-rwxrwxrwx 1 ubuntu ubuntu 2249272 Jul 4 11:15 fpcalc64
ubuntu@ubuntu:~/code/jthink/jaikoz/JaikozAppImage/jaikoz/lib/app$ ./fpcalc64 /home/ubuntu/Downloads/Red*
FILE=/home/ubuntu/Downloads/RedSharp_-_Walk_in_the_row.mp3
DURATION=273
FINGERPRINT=AQADtIsURmsSDc9i44-Iqsemr8a1MIOXKBHCi9CJ0M7R-MH5oNNy_Dp26ag55EmUJ5DjI-zREE-P9wz-odeKCyGbHXriIj8qbiYaPRue4_zx7MHHE1eiw1yE80d1IdmDnDy-LCeub_gVVLkGP8uHmTNhVjkicUeyh0MTHs_RE8-Jurg7XItwHVl-aFmHPGMq_Al-NCGFx0d6adD6I39RnQoaTXmK48JhTqOM58R19LED8yBf9LvQo1GW4viRk4Qm6cUvpHlRi8dn9MngFqRy-EdGlNPxHbp8oR8aLnvBLkb_4I8KS9Kh57jEKsOv4nD04UeZmZDyC64efLB1jK8Oj8hP-BSuF7aQ92h-4h1eKJJ1wY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iIIIUKyIggABACAAAIDAA
问题 3
我是否必须将 fpcalc64 存储在bin文件夹而不是lib/app中。如果我这样做,我该怎么做,它是一个预编译的二进制文件?