Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从小程序编写日志文件。
当作为 Java 应用程序运行时,我可以写入文件,但是当作为小程序运行时,我得到.\logs\test.log (The system cannot find the path specified).
.\logs\test.log (The system cannot find the path specified)
在使用 Eclipse进行调试时,如何允许它写入磁盘?
编辑:是因为反斜杠吗?
您应该在临时文件中从小程序中写入任何您想要的内容,以创建临时文件试试这个 。您还可以在 java 中获取系统临时文件夹并在那里创建您的文件,阅读此内容。@Yoni 是对的,当您在小程序中时,您的权限有限。