Ошибка java io ioexception cannot run program

I have project in React Native, and I’m not being able to build on the Android Studio due the following error.

Here’s the detailed log with additional info:

java.io.IOException: Cannot run program "node" (in directory "/Users/fabioernanni/git/fintech-ewallet-mobile/android"): error=2, No such file or directory

java.io.IOException: error=2, No such file or directory

Cause: error=2, No such file or directory

I have tried to reinstall Node, Android Studio, to link the tscript library so the Android Studio would recognize the «node» but nothing seems to help.

asked Apr 20, 2022 at 19:03

Ernanni's user avatar

ErnanniErnanni

1842 silver badges12 bronze badges

1

I have a similar problem with Android Studio (bumble bee) version with node on My Mac M1 Chip 
so to solve this open your Android Studio from terminal
.
To Open Android Studio from terminal on Mac m1 just open your Terminal and paste the following command

open -a /Applications/Android Studio.app

this will open your android studio and then you can open your project and can run build from android studio
Note : be sure that Android studio is not running state if its running just Quite it and then launch from Terminal

answered Apr 21, 2022 at 6:22

Ouneeb Ur Rehman's user avatar

4

Do these steps to solve it:-

STEP 1: First quit the android studio, if it is in a running state.

command + Q

STEP 2: Enable the permission for android studio printenv.

sudo chmod +x /Applications/Android Studio.app/Contents/bin/printenv

STEP 3: Open android studio from terminal app.

open -a /Applications/Android Studio.app

answered Oct 7, 2022 at 6:19

Rohit Kumar's user avatar

Rohit KumarRohit Kumar

6758 silver badges13 bronze badges

Что делать, если при попытке прошить Arduino (WeMos D1) по wi-fi вы видите вот такую ошибку?
«java.io.IOException: Cannot run program «python.exe»: CreateProcess error=2, Не удается найти указанный файл»
Речь идет конечно о работе под Windows. При том, под Windows 7, в моем случае.

У меня всё прекрасно шьется через ком-порт и программа для заливки скетча видит порт для Wi-Fi, но во время заливки скетча вылезает ошибка, о которой сказано выше.

Ок. Исправляем.

Для начала, установите Pyton, если все еще этого не сделали. Некоторые спрашивают «А зачем? А для чего? А почему?». Отвечу — ради Питона. Короче, надо и всё.

Вот ссылка https://www.python.org/downloads/windows/

Если установлен, выполняем вот эти простые действия.

Найдите путь к питону

Определите путь к папке, содержащей файл python.exe. Для этого в меню кнопки Пуск, в поле поиска, вбейте python.exe, например. Или воспользуйтесь другим поиском файлов на вашем компьютере, если есть.

У меня он нашелся в папке
c:Program Files (x86)OpenOffice 4program
c:Program FilesGIMP 2Python
с:UsersПОЛЬЗОВАТЕЛЬAppDataLocalProgramsPythonPython37-32

Судя по всему, третий вариант самый правильный. У вас будет что-нибудь похожее, но вместо «ПОЛЬЗОВАТЕЛЬ» наверняка окажется что-нибудь своё. Этот путь и берем за основу потому, что там фигурирует AppData, а она мне нравится больше прочих.

Идите на Панель управления

Обычно ссылка на нее есть в меню кнопки Пуск, но иногда приходится воспользоваться все тем же полем поиска там же.

В панели управления есть еще одно поле с поиском. У меня оно находится в правом верхнем углу. Туда ввожу «Изменение системных переменных среды».

А лучше эту фразу сразу ввести в поле поиска в меню кнопки Пуск. Или не фразу, а слово «переменны». Звучит неграмотно, но работает.

Лезем в окно «Свойства системы»

Кликнули в результатах поиска по финговинке с названием «Изменение системных переменных среды» и у нас открылось окно «Свойства системы».

Вообще-то, туда можно попасть другим способом, но я не уверен, что у вас Windows 7, а потому рассказываю про поиск. Вот так, например, результат поиска выглядит в Английской Windows 10. Картинка кликабельна.

Я начал писать «variables» и нужный результат появился в самом верху списка.

В русскоязычной версии, как уже говорил, можете попробовать ввести слово «переменны». Нам нужны системные, если что.

В общем, кликнули, открылось, в окне залезаем во вкладку «Дополнительно».

Там жмем кнопку «Переменные среды».

Вот куда попал я после клика.

Заходим в «Переменные среды»

Мы почти на месте. В переменных среды нас интересует нижнее поле «Системные переменные». В нем находим переменную среды Path, выделяем ее и жмем кнопку «Изменить». Потому, что время что-то менять.

С этого места (как впрочем и до него) вы всё делаете на свой страх и риск, а я не несу никакой ответственности если к примеру ваш комп сгорит, мышка написает на коврик, а клавиатура пойдет трещинами и развалится.

В поле «Значение переменной» вы увидите строку с кучей очень нужных данных. Ни дай вам Бог их случайно удалить или покоцать!

В конце этой строки осторожно дописываем точку с запятой «;» (без кавычек и пробелов, …), а после нее вставьте путь к файлу python.exe.

Не путь к папке! Путь к файлу!!!

В моем случае это выглядит так «ВАЖНЫЕ ДАННЫЕ;с:UsersПОЛЬЗОВАТЕЛЬAppDataLocalProgramsPythonPython37-32python.exe»

Если всё правильно ввели, жмём кнопку ОК.

Еще раз жмем кнопку ОК.

И снова жмём ОК.

Отлично, после этого троекратного ОК всё станет ОК.

Проверяем

Гружу скетч в микроконтроллер по Wi-Fi и… Ну… ошибка связанная с «python.exe» пропала. Но, появилась новая. Однако, это уже совсем другая история.

Помогло? Зашли админу на чай с печеньками

       Даша — 120 RUB       Derek341 — 110 RUB       Любовь — 100 RUB       CoRRRn — 100 RUB       Anna — 100 RUB       Ольга — 50 RUB       Alex — 30 RUB       Анатолий — 10 RUB       Даша — 120 RUB       Derek341 — 110 RUB       Любовь — 100 RUB       CoRRRn — 100 RUB       Anna — 100 RUB       Ольга — 50 RUB       Alex — 30 RUB       Анатолий — 10 RUB

Большое спасибо!

А с вами был Доктор Лексиум.
Сохраните ссылку на этот блог. Может пригодиться.

@fnguyen99

Hi,
We spent 4 hours yesterday trying to solve this problem, and couldn’t find anything on the web.
Can you please provide useful suggestion to sharper1999@gmail.com?

Thank you.
Fred

================
Arduino: 1.8.6 Hourly Build 2018/05/10 01:33 (Windows 10), Board: «Arduino/Genuino Uno»

Sketch uses 2492 bytes (7%) of program storage space. Maximum is 32256 bytes.
Global variables use 208 bytes (10%) of dynamic memory, leaving 1840 bytes for local variables. Maximum is 2048 bytes.
.
java.io.IOException: Cannot run program «{runtime.tools.avrdude.path}/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.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2197)
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)
… 8 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.

@PaulStoffregen



Copy link


Sponsor


Contributor

In those 4 hours, did you try downloading the 1.8.5 (stable release) ZIP file and run that version? Does 1.8.5 work, or also fail?

You might also try temporarily disabling any anti-virus software, and Windows Defender. Sometimes these cause trouble.

@fnguyen99

Who is paying for my 4 hours of wasted time on version 1.8.5? …

I thought 1.8.5 was stable? That’s the one that is released on your website
https://www.arduino.cc/en/Main/Software

Are you telling us, you didn’t test this version before releasing to users?
I am using Windows 10.

I also tried the beta version, and the same error occurred.

There is no anti virus software interfering, and if it did wouldn’t it give
some type of warning to allow running?

Please advise what these errors mean, and how to work around it?

On Mon, May 14, 2018 at 2:23 PM, Paul Stoffregen ***@***.***> wrote:
In those 4 hours, did you try downloading the 1.8.5 (stable release) ZIP
file and run that version? Does 1.8.5 work, or also fail?

You might also try temporarily disabling any anti-virus software, and
Windows Defender. Sometimes these cause trouble.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#7598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AldTgzDcFlUalstIpG76wr6952AbyH6Jks5tyfXSgaJpZM4T-Sei>
.

=====================
straight from …
the Sharpshooter
sharper1999@gmail.com
=====================

Arduino: 1.8.6 Hourly Build 2018/05/10 01:33 (Windows 10), Board: «Arduino/Genuino Uno»

Sketch uses 2492 bytes (7%) of program storage space. Maximum is 32256 bytes.
Global variables use 208 bytes (10%) of dynamic memory, leaving 1840 bytes for local variables. Maximum is 2048 bytes.

java.io.IOException: Cannot run program «{runtime.tools.avrdude.path}/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.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2197)
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)
… 8 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.

@matthijskooijman

Who is paying for my 4 hours of wasted time on version 1.8.5? … I thought 1.8.5 was stable?

1.8.5 is indeed the stable version, but your report says you were using «1.8.6 Hourly Build» instead, which I think is what prompted @PaulStoffregen’s suggestion to try 1.8.5.

Could it be that you have an older version of the AVR boards installed? You could try updating to the latest version through the boards manager in the IDE.

@facchinm

Found the bug, a fix is ongoing. Thanks for reporting, but always use stable builds (1.8.5 in this case) if you need something stable.

@facchinm

Fixed by bc19d7b , AVR core 1.6.22 is not yet published in the actual package_index so it was discarded due to the missing overlay. Builds are ongoing

@dcetin01

I too, recently had a similar ‘error’ and have always used 1.8.5 build, please help!!
Here is a copy of the error:

Arduino: 1.8.5 (Windows 10), Board: «Arduino/Genuino Uno»

Sketch uses 4420 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 483 bytes (23%) of dynamic memory, leaving 1565 bytes for local variables. Maximum is 2048 bytes.
java.io.IOException: Cannot run program «C:Usersdcetin01Arduinohardwaretoolsavr/bin/avrdude»: CreateProcess error=193, %1 is not a valid Win32 application
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.uploadUsingPreferences(SerialUploader.java:207)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:713)
at processing.app.SketchController.exportApplet(SketchController.java:686)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
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)
… 8 more
An error occurred while uploading the sketch
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_115740: C:Usersdcetin01DocumentsArduinolibrariesarduino_115740
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_269568: C:Usersdcetin01DocumentsArduinolibrariesarduino_269568
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_305492: C:Usersdcetin01DocumentsArduinolibrariesarduino_305492
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_545055: C:Usersdcetin01DocumentsArduinolibrariesarduino_545055
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_696625: C:Usersdcetin01DocumentsArduinolibrariesarduino_696625
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_721834: C:Usersdcetin01DocumentsArduinolibrariesarduino_721834
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_795191: C:Usersdcetin01DocumentsArduinolibrariesarduino_795191
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_920364: C:Usersdcetin01DocumentsArduinolibrariesarduino_920364
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_930976: C:Usersdcetin01DocumentsArduinolibrariesarduino_930976
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_96981: C:Usersdcetin01DocumentsArduinolibrariesarduino_96981
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesU8glib: C:Usersdcetin01DocumentsArduinolibrariesU8glib
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_115740: C:Usersdcetin01DocumentsArduinolibrariesarduino_115740
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_269568: C:Usersdcetin01DocumentsArduinolibrariesarduino_269568
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_305492: C:Usersdcetin01DocumentsArduinolibrariesarduino_305492
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_545055: C:Usersdcetin01DocumentsArduinolibrariesarduino_545055
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_696625: C:Usersdcetin01DocumentsArduinolibrariesarduino_696625
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_721834: C:Usersdcetin01DocumentsArduinolibrariesarduino_721834
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_795191: C:Usersdcetin01DocumentsArduinolibrariesarduino_795191
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_920364: C:Usersdcetin01DocumentsArduinolibrariesarduino_920364
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_930976: C:Usersdcetin01DocumentsArduinolibrariesarduino_930976
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesarduino_96981: C:Usersdcetin01DocumentsArduinolibrariesarduino_96981
Invalid library found in C:Usersdcetin01DocumentsArduinolibrariesU8glib: C:Usersdcetin01DocumentsArduinolibrariesU8glib

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

@facchinm

@dcetin01 your bug is different as seems related with an antivirus activity. Try whitelisting "C:Usersdcetin01Arduinohardwaretoolsavr/bin/avrdude" (maybe you’ll have to reinstall the IDE, it depends on your antivirus) and you should be fine.

Symptoms

When the following ERROR appears when trying to add a git repository:

Exception executing command "git ls-remote -h <REPO> " java.io.IOException: Cannot run program "git": java.io.IOException: error=2, No such file or directory 

com.atlassian.fisheye.plugins.scm.utils.process.ProcessException - 
java.io.IOException: Cannot run program "git": java.io.IOException: 
error=2, No such file or directory

java.io.IOException - Cannot run program "git": java.io.IOException: error=2, No such file or directory

java.io.IOException - java.io.IOException: error=2, No such file or directory

Cause

Fisheye can’t find the GIT Executable: http://confluence.atlassian.com/display/FISHEYE/Git+Client

Resolution

Install git on the Server where Fisheye is installed:

  • Debian Like:
    apt-get install git
  • RedHat Like:
    yum install git
  • Windows:
    http://code.google.com/p/msysgit

Last modified on Jul 31, 2018

Related content

  • No related content found

Рекомендуемые сообщения

В теме 11 сообщений

Hayp1k

Новичок

    • Поделиться

java.io.IOException: Cannot run program «C:UsersUserAppDataRoaming.tlauncherjvmsjre1.8.0_281binjavaw.exe» (in directory «.»): CreateProcess error=2, Не удается найти указанный файл at java.lang.ProcessBuilder.start(Unknown Source) at net.minecraft.launcher.process.JavaProcessLauncher.start(JavaProcessLauncher.java:27) at org.tlauncher.tlauncher.rmo.Bootstrapper.start(Bootstrapper.java:404) at org.tlauncher.tlauncher.rmo.Bootstrapper.main(Bootstrapper.java:123) Caused by: java.io.IOException: CreateProcess error=2, Не удается найти указанный файл at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl. (Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) … 4 more

Ссылка на комментарий
Поделиться на другие сайты

Shomen

Великий магистр

    • Поделиться

Roaming.tlauncher? что за директория такая?

Ссылка на комментарий
Поделиться на другие сайты

Саша Кори

Любитель

    • Поделиться

Проведи полную переустановку TLauncher. А вообще советую пользоваться TL Legacy там нет подобных ошибок.

Только что, Shomen сказал:

Roaming.tlauncher? что за директория такая?

доброе утро :3

Ссылка на комментарий
Поделиться на другие сайты

Hayp1k

Новичок

  • Автор
    • Поделиться

Я не очень в этом разбераюсь могу скинуть логи

Ссылка на комментарий
Поделиться на другие сайты

Shomen

Великий магистр

    • Поделиться

11 минут назад, Hayp1k сказал:

Я не очень в этом разбераюсь могу скинуть логи

Зайди в настройки лаунчера, найди пункт «путь к java» и исправь путь

Ссылка на комментарий
Поделиться на другие сайты

Hayp1k

Новичок

  • Автор
    • Поделиться

у меня даже не заходит в сам лаунчер
 

2022-07-24_11-56-23.png

2022-07-24_11-56-30.png

Ссылка на комментарий
Поделиться на другие сайты


Гость

Гость

    • Поделиться

23 минуты назад, Hayp1k сказал:

у меня даже не заходит в сам лаунчер
 

2022-07-24_11-56-23.png

JAVA на компьютере не установлено. 

Ссылка на комментарий
Поделиться на другие сайты


Гость

Гость

    • Поделиться

JAVA на компьютере не установлено. 

Ссылка на комментарий
Поделиться на другие сайты

Shomen

Великий магистр

    • Поделиться

2 часа назад, Hayp1k сказал:

у меня даже не заходит в сам лаунчер
 

2022-07-24_11-56-23.png

2022-07-24_11-56-30.png

переустанови лаунчер

Ссылка на комментарий
Поделиться на другие сайты

Hayp1k

Новичок

  • Автор
    • Поделиться

переустанавливали и лаунчер, и java тоже, я не знаю что делать😥

Ссылка на комментарий
Поделиться на другие сайты

Shomen

Великий магистр

    • Поделиться

10 минут назад, Hayp1k сказал:

переустанавливали и лаунчер, и java тоже, я не знаю что делать😥

качай тогда этот

Ссылка на комментарий
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Войти

Уже есть аккаунт? Войти в систему.

Войти

Понравилась статья? Поделить с друзьями:
  • Ошибка invalid access token что это
  • Ошибка internet explorer нет доступа
  • Ошибка internet explorer в майнкрафт
  • Ошибка internet explorer zonemapping ошибка
  • Ошибка internet connection error как исправить