英文:
Java Xattjr on Mac - Can't load resource: libxattrj.dylib
问题
在我尝试在Mac上写入文件x-attributes的过程中,我找到了一个旧的库。看起来Java不支持在Mac上操作X-attr,这是一个已知问题(自2014年起),并且引用的回答是使用第三方库(链接至错误报告)。我还没有看到其他能够实现这一功能的库,而且这个库已经多年没有更新了。在我的情况下,当我尝试使用它时,我会得到这个错误:
Java.io.Exception : Classloader - 无法加载资源:libxattrj.dylib
如果有人能够让这个运行起来,我很想知道如何操作。供参考,它不在Maven公共仓库中。将以下内容添加到pom.xml以导入该库。
<repositories>
<repository>
<id>my-repo1</id>
<name>liferay</name>
<url>https://repository.liferay.com/nexus/content/repositories/public/</url>
</repository>
</repositories>
</dependencies>
....
<dependency>
<groupId>com.liferay</groupId>
<artifactId>ch.securityvision.xattrj</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
英文:
In my quest to write file x-attributes on mac, I came across an old library. It seems that Java does not support X-attr on Mac, this is a known issue (since 2014), and the cited response was to use the third party library (Link to the bug report). I have not seen any other libraries capable of doing this, and this one has not been updated in years. In my case, when trying to use it, I get this error:
Java.io.Exception : Classloader - Can't load Resource: libxattrj.dylib
If anyone can get this running, I'd love to know how. For reference, it is not in the maven public repo. Add this to pom.xml to import it the library.
<repositories>
<repository>
<id>my-repo1</id>
<name>liferay</name>
<url>https://repository.liferay.com/nexus/content/repositories/public/</url>
</repository>
</repositories>
</dependencies>
....
<dependency>
<groupId>com.liferay</groupId>
<artifactId>ch.securityvision.xattrj</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
专注分享java语言的经验与见解,让所有开发者获益!
评论