我正在使用Scala中的d-bus。我已将此添加到我的build.sbt
:
libraryDependencies ++= Seq(
...
"com.github.hypfvieh" % "dbus-java" % "3.0.2",
...
}
找到了建筑物,但在运行时找不到UnixSocket
类:
java.lang.RuntimeException:无法从任何给定的源加载库:[SYSTEM_PATH,CUSTOM_PATH,CLASS_PATH] 在com.github.hypfvieh.system.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:89) 在com.github.hypfvieh.system.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:69) 在cx.ath.matthew.unix.UnixSocket。(UnixSocket.java:54)
我在Maven上尝试过各种可能具有此类的人工制品,但没有成功。
我应该使用另一个依赖项吗?还是需要手动添加适当的库?
答案 0 :(得分:1)
(旧的)dbus-java类/库都不在Maven上,那些绑定从未使用Maven作为构建系统。原始绑定仍然可以在dbus git repo上看到。
如果您使用的是Debian,则应该可以通过运行<!--Dev Section-->
<section id="developer">
<div class="diamond"></div>
<div class="headshot"></div>
<div class="developer-inner">
<div class="headshot-text">
<h1>Lorem Lorem</h1>
</div>
<div class="developer-about">
<div class="dev-panel-left">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
</p>
</div>
<div class="split"></div>
<div class="dev-panel-right">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
</p>
</div>
</div>
</div>
</section>
来获取库。如果您使用的不是Debian或Debian衍生产品,则必须从source进行编译。
请注意,但是发生的错误实际上是由于您未加载JNI代码库而导致的,该代码实际上位于dbus-java存储库中。