Java错误无法为jnidispatch库创建临时文件 [英] Java error failed to create temporary file for jnidispatch library

查看:440
本文介绍了Java错误无法为jnidispatch库创建临时文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试安装第三方Java应用程序时,出现此错误无法为jnidispatch库创建临时文件:java.io.IOException:只读文件系统.

While trying to install a third part java application I got this error Failed to create temporary file for jnidispatch library: java.io.IOException: Read-only file system.

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:35)
Caused by: java.lang.Error: Failed to create temporary file for jnidispatch library: java.io.IOException: Read-only file system
        at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:751)
        at com.sun.jna.Native.loadNativeLibrary(Native.java:685)
        at com.sun.jna.Native.<clinit>(Native.java:109)
        at com.sun.jna.Pointer.<clinit>(Pointer.java:42)
        at com.sun.jna.PointerType.<init>(PointerType.java:25)
        at com.sun.jna.ptr.ByReference.<init>(ByReference.java:32)
        at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:22)
        at com.sun.jna.ptr.IntByReference.<init>(IntByReference.java:18)
        at org.rzo.yajsw.os.posix.PosixProcess.<init>(PosixProcess.java:43)
        at org.rzo.yajsw.os.posix.OperatingSystemPosix.setWorkingDir(OperatingSystemPosix.java:10)
        at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:163)
        ... 5 more

推荐答案

我刚刚遇到了同样的问题;该程序已经运行了好几个月,突然出现了这个错误.使用strace进行的一些快速调试表明它正在尝试打开:

I just had this exact same problem; the program had been working fine for months and suddenly this error. Some quick debugging with strace shows that it's trying to open:

/tmp/jna/jna6858279656331549999.tmp

/tmp/jna自然是由另一个用户拥有的,而在我的情况下,它已经使用了一周.我什至无法开始解释程序如何整天正常工作,然后突然失败,因为它无法写入此目录.

Naturally /tmp/jna was owned by another user, and in my case was a week old. I can't even start to explain how the program had been working properly all day and then suddenly fail because it cannot write to this directory.

无论如何,我将/tmp/jna sudo chmod'd设置为777,现在一切正常.走吧.

Anyhow, I sudo chmod'd /tmp/jna to 777 and now everything's fine. Go figure.

这篇关于Java错误无法为jnidispatch库创建临时文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆