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.
我正在尝试找到一个解决方案:如何将 Junit 生成的错误消息打印到文本文件中。
捕获/生成错误消息并将其写入任何文件。
`new FileWriter(new File("myFile.txt")).write(errorMessage)