java.io.IOException when saving

I get this error when try to save a simple excisting sketch that worked before.

java.io.IOException: The system cannot find the file specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(File.java:2024)
at processing.app.BaseNoGui.saveFile(BaseNoGui.java:886)
at processing.app.SketchFile.save(SketchFile.java:287)
at processing.app.Sketch.save(Sketch.java:138)
etc etc etc.....

I have completely uninstalled Arduino and preference.txt and then re-installed Arduino version 1.8.19.
I don't have Java on my PC (Windows 10)
The sketch compiles fine.

I have been working with Arduino for 10 years, this error is strange to me.

The Windows logbook has this warning from Windows defender when I try to save in Arduino:

C:\Program Files (x86)\Arduino\java\bin\javaw.exe has been blocked from modifying D:\DATA BACKUPPED\Documenten Albert\1 Cable killer\Arduino code\Template\Template_SAM and UNO\Template_SAM_UNO\ by Controlled Folder Access.
 	Detection time: 2022-08-18T07:45:10.509Z
 	User: MEDION-LAPTOP\Albert
 	Path: D:\DATA BACKUPPED\Documenten Albert\1 Cable killer\Arduino code\Template\Template_SAM and UNO\Template_SAM_UNO\
 	Process Name: C:\Program Files (x86)\Arduino\java\bin\javaw.exe
 	Security intelligence Version: 1.373.545.0
 	Engine Version: 1.1.19500.2
 	Product Version: 4.18.2205.7

1 Like

I have found the cause of the problem: there is a conflict with Windows Defender.
The solution is to exclude any files opened by Arduino.exe from Windows Defender.

This is the procedure:
Start > Settings > Update & Security > Windows Security > Virus & threat protection > Manage settings > Exclusions > Add or remove exclusions > (Windows security YES) > Add an exclusion: C:\Program Files (x86)\Arduino\arduino.exe

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.