java error??? -{SOLVED}

I haven’t used an avr board in a while but when I tried to load one up this morning I am getting this error:

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Huh.DESKTOP-6IIJI79\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Huh.DESKTOP-6IIJI79\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Huh\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10810 -build-path C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_build_199250 -warnings=all -build-cache C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_cache_735942 -prefs=build.warn_data_percentage=75 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Huh.DESKTOP-6IIJI79\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Huh.DESKTOP-6IIJI79\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Huh\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10810 -build-path C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_build_199250 -warnings=all -build-cache C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_cache_735942 -prefs=build.warn_data_percentage=75 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'uno' from platform in folder: C:\Program
Using core 'arduino' from platform in folder: C:\Program
Detecting libraries used...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\sketch\\Blink.ino.cpp" -o nul
Generating function prototypes...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\sketch\\Blink.ino.cpp" -o "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10810 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\sketch\\Blink.ino.cpp" -o "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_cache_735942\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Linking everything together...
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.elf" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250\\sketch\\Blink.ino.cpp.o" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/..\\arduino_cache_735942\\core\\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250" -lm
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.elf" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.elf" "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.hex"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\HUH~1.DES\\AppData\\Local\\Temp\\arduino_build_199250/Blink.ino.elf"
Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
___REMOVE___/bin/avrdude -C___REMOVE___/etc/avrdude.conf -v -patmega328p -carduino -PCOM18 -b115200 -D -Uflash:w:C:\Users\HUH~1.DES\AppData\Local\Temp\arduino_build_199250/Blink.ino.hex:i 
java.io.IOException: Cannot run program "___REMOVE___/bin/avrdude": CreateProcess error=2, The system cannot find the file specified
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
 at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
 at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
 at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
 at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
 at processing.app.SketchController.upload(SketchController.java:732)
 at processing.app.SketchController.exportApplet(SketchController.java:703)
 at processing.app.Editor$UploadHandler.run(Editor.java:2075)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
 at java.lang.ProcessImpl.create(Native Method)
 at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
 at java.lang.ProcessImpl.start(ProcessImpl.java:137)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 ... 9 more
An error occurred while uploading the sketch

It happens with all my uno/nano boards and all sketches. This error was generated using the blink example.

In my experience Java errors are usually the result of an error in the source code that creates a situation where Java can't parse it - presumably due to inadequate error protection in the IDE code.

...R

Ok but how can I fix it.

Hutkikz:
Ok but how can I fix it.

It's a long time since I had one and I think the problem was unbalanced quote marks (just came to me as I was typing this). Assuming my guess is correct then carefully checking the program code is probably the solution.

The error trips up Java before the C++ compiler gets a look at it.

...R

The error I posted was using the Blink example. It's same with any sketch.

I have recently been playing with a MKR wifi 1010 and have installed the associated libraries for that board.
Since that’s the only thing I’ve done with the ide since the last successful avr upload I’m starting to think I corrupted my install. The mkr uploads no issue.

This error indicates you need to take some drastic action. Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:

  • In the Arduino IDE, click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now use your board before reinstalling any packages via Boards Manager.

Good Call! Many Thanks

I will mark this one solved.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per