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.
我正在尝试将图像文件保存在运行 JES 程序的目录中,然后它返回
The error was:java.lang.NullPointerException I wasn't able to do what you wanted. The error java.lang.NullPointerException has occured
我的代码非常简单,
map=makePicture(pickAFile()) writePictureTo(map,r'testfile.png')
我以前和你在同一条船上。然后我发现您需要使用新图像放置正确的路径。尝试像这样更改路径:
writePictureTo(picture,"C://Users//Toshiba//Desktop//bulleyes.png")
您可以输入您的计算机名称,并且不要忘记使用正斜杠而不是反斜杠。
用于setMediaFolder()首先浏览到 JES 目录。
setMediaFolder()
仅供参考,您无法使用 JES 保存到联网位置(您可以在学校和大学中找到)