Запуск Shell Script через IDE (inteliJ) и получение: Windows Subsystem для Linux не имеет установленных дистрибутивов, есть идеи, почему?
Мой код:
public class TestScript {
public static void main(String args[]) throws IOException, InterruptedException {
String[] cmd = { "bash", "-c", "ExecutorTest.sh" };
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
p.waitFor();
}
}
Вывод:
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore