Closed dadul96 closed 1 year ago
Hi @dadul96 I never met this issue but it seems valid. Anyway the proposed solution in #67 seems not complete (See https://github.com/rogerclarkmelbourne/Arduino_STM32/pull/846) nor compatible with other IDE (Ex: PIO or Eclispe +Sloeber) as they are using the Arduino Java. My guess is that .jar should be replaced to avoid any further issue. This would be more efficient than trying to give correct (and older) java version. What will happen if next Arduino IDE version change the Java version? It will probably failed.
Hello @fpistm
I see what you mean - my fix gives some nasty side effects to Linux and macOS users. Of course, the ideal solution would be to replace the .jar, but I don't think that I could lift such a huge architectural change. As a temporary solution, my old (unimproved) version of the PR (if exist "C:\Program Files (x86)\Arduino\java\bin" set PATH=C:\Program Files (x86)\Arduino\java\bin;%PATH%
) could be used. This at least allows Arduino IDE users (who installed it in the default directory) to solve this issue. All other operating systems and IDE's would not be affected by this fix.
Right, anyway several user does not install Arduino to the default location. I will replace the jar by a smaller binary doing the same than Linux and MacOS. Probably using a multi OS serial library like https://github.com/wjwwood/serial
Thank you for this thread! Fixed my issue :)
This problem occurs when a second (different) Java version is installed on a windows PC (besides the one provided with the Arduino IDE). Instead of using the provided Java version of the Arduino IDE the
maple_upload.bat
-file uses the Java version found in the environment path (oftentimes this is a different one).This results in the following error message:
To solve this problem the following line should be added to the maple_upload.bat:
if exist "C:\Program Files (x86)\Arduino\java\bin" set PATH=C:\Program Files (x86)\Arduino\java\bin;%PATH%
This line temporarily changes the PATH during the execution of this batch file and ensures that the correct Java version is used.
This issue also has been discussed here.