Java Problems with a fresh install

Hello,
I am slowly progressing past the basics but am totally perplexed as I have just set up on old laptop with Win7 and have just installed Java and the latest Win7 version of Arduino IDE (after the windows and drivers).
Anyway, after setting up my libraries I tried a sketch and got Java errors so I went back to basics and plugged in my genuine Uno with the Blink sketch and still get the Java errors. Any help would be greatly appreciated ...

Error messages are as follows;

Arduino: 1.8.13 (Windows 7), Board: "Arduino Uno"

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.

C:\Users\Tobias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Tobias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:C:\Users\Tobias\AppData\Local\Temp\arduino_build_441669/Blink.ino.hex:i

java.io.IOException: Cannot run program "C:\Users\Tobias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/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:2055)

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.(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

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Hi @stevetobias. Please try the fix described in this Help Center article:

I was reading through some other Java related error posts and found that deleting everything in the \Arduino15\ directory except the preferences.txt did the trick. Actually I did not delete everything at first, I just moved them to another folder in my downloads directory but they will be deleted now. After doing this I just needed to reinstall the boards but they were easy because the prefrences.txt still had the JSON links so job done.

Sorry I did not investigate further before posting but on the flip side I hope this can help someone else in the future.
Also after uploading a sketch I get some very detailed information about the board (have never had this before).

additional details as follows;

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Tobias\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Tobias\AppData\Local\Temp\arduino_build_18184/BMx280_I2C.ino.hex"
avrdude: writing flash (11658 bytes):

Writing | ################################################## | 100% 1.82s

avrdude: 11658 bytes of flash written
avrdude: verifying flash memory against C:\Users\Tobias\AppData\Local\Temp\arduino_build_18184/BMx280_I2C.ino.hex:
avrdude: load data flash data from input file C:\Users\Tobias\AppData\Local\Temp\arduino_build_18184/BMx280_I2C.ino.hex:
avrdude: input file C:\Users\Tobias\AppData\Local\Temp\arduino_build_18184/BMx280_I2C.ino.hex contains 11658 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.41s

avrdude: verifying ...
avrdude: 11658 bytes of flash verified

avrdude done. Thank you.

stevetobias:
Sorry I did not investigate further before posting but on the flip side I hope this can help someone else in the future.

No need to apologize. This is a very confusing error that should never occur under normal circumstances. Thanks for taking the time to post an update.

stevetobias:
Also after uploading a sketch I get some very detailed information about the board (have never had this before).

This is controlled via the "Show verbose output during: upload" setting in the Arduino IDE's File > Preferences.

Even though I typically recommend against having the "Show verbose output during: compilation" setting enabled (because the extra output it provides is not generally useful), I do recommend always leaving the verbose upload output enabled because it's useful as a progress indicator during successful uploads and useful for troubleshooting of failed uploads.

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