gpt4 book ai didi

java - 从程序文件获取文件

转载 作者:太空宇宙 更新时间:2023-11-04 15:01:46 24 4
gpt4 key购买 nike

嘿,今天在我的游戏中,我将缓存添加到我的安装程序中,这样用户就不必将其放在 c: 驱动器中,所以我将代码更改为这个

public static String findcachedir() {

return System.getProperty("C:/Program Files/TheIronDoor/667cache");
}

但是当我使用代码时,没有任何内容显示图像,并且其他内容也没有显示,就像它不存在一样,所以我问我的 friend ,他说这可能是我在铁门之间的空间,所以我删除了空间但它仍然在做同样的事情

最佳答案

return System.getProperty("C:/Program Files/TheIronDoor/667cache");

这将返回一个具有该名称的 JVM 属性...即,它肯定会返回 null!

您可能想返回“C:/Program Files/TheIronDoor/667cache”

关于java - 从程序文件获取文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22492306/

24 4 0
文章推荐: javascript - 为 `