无法加载7z-JBinding:java.library.path中没有7-Zip-JBinding

时间:2014-11-12 19:41:38

标签: java 7zip archlinux

系统详细信息:Linux 3.14.21-1-MANJARO x64

Java版:java版“1.8.0_25”

Java(TM)SE运行时环境(版本1.8.0_25-b17)

Java HotSpot(TM)64位服务器VM(内置25.25-b02,混合模式)

安装了依赖项:java-p7zip-binding和p7zip

我已经安装了filebot来维护我的系统上的媒体库,但是,每当我执行该程序时,我都会收到以下错误:

SevenZipNativeInitializationException: Failed to load 7z-JBinding: no 7-Zip-JBinding in java.library.path

如上所述,我确实安装了所需的依赖项。

当我使用

java -XshowSettings:properties

我使用我的库路径获取此输出

Property settings:
awt.toolkit = sun.awt.X11.XToolkit
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = .
java.class.version = 52.0
java.endorsed.dirs = /usr/lib/jvm/java-8-jdk/jre/lib/endorsed
java.ext.dirs = /usr/lib/jvm/java-8-jdk/jre/lib/ext
    /usr/java/packages/lib/ext
java.home = /usr/lib/jvm/java-8-jdk/jre
java.io.tmpdir = /tmp
java.library.path = /usr/java/packages/lib/amd64
    /usr/lib64
    /lib64
    /lib
    /usr/lib
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.8.0_25-b17
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.8.0_25
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Oracle Corporation
java.vm.version = 25.25-b02
line.separator = \n 
os.arch = amd64
os.name = Linux
os.version = 3.14.21-1-MANJARO                                                                                             
path.separator = :                                                                                                         
sun.arch.data.model = 64                                                                                                   
sun.boot.class.path = /usr/lib/jvm/java-8-jdk/jre/lib/resources.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/rt.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/sunrsasign.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/jsse.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/jce.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/charsets.jar
    /usr/lib/jvm/java-8-jdk/jre/lib/jfr.jar
    /usr/lib/jvm/java-8-jdk/jre/classes
sun.boot.library.path = /usr/lib/jvm/java-8-jdk/jre/lib/amd64
sun.cpu.endian = little
sun.cpu.isalist = 
sun.io.unicode.encoding = UnicodeLittle
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = unknown
user.country = US
user.dir = /usr/lib/amd64
user.home = /home/name
user.language = en
user.name = name
user.timezone =

我已经将java-p7zip-binding软件包附带的lib7-Zip-JBinding.so添加到所有java.library.path目录中,试图让它工作,但不幸的是它没有。

关于我为什么没有加载错误的任何想法?

2 个答案:

答案 0 :(得分:2)

LD_LIBRARY_PATH

!=

java.library.path

事实证明我需要实现的路径是

LD_LIBRARY_PATH

我的版本恰好是

/usr/lib/jvm/java-8-openjdk/jre/lib/amd64

我怀疑这会解决java 7的这个问题,只需使用适当的目录。只需将.so文件复制并粘贴到该目录中即可立即取得成功。

答案 1 :(得分:0)

我在覆盆子pi2上遇到了所有相同的症状,但我无法使用op user259861解决方案。

这对我有用:

我从'其他'下抓取了jar文件。前往http://jdownloader.org/download/offline

  1. mkdir /tmp/jd2
  2. cd /tmp/jd2
  3. wget http://installer.jdownloader.org/JDownloader.jar
  4. sudo java -Djava.awt.headless=true -jar JDownloader.jar
  5. cd libs/
  6. sudo jar xf sevenzipjbindingLinuxArmVersion.jar
  7. sudo cp Linux-armpi/lib7-Zip-JBinding.so /usr/share/filebot/
  8. filebot -script "fn:sysinfo" |grep 7-Zip
  9. filebot sysinfo函数的输出现在应为:7-Zip-JBinding: OK