You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent some time on the maximum allowed memory of JVM, but it turned out that the problem was caused by WLS, it seems that WLS doesn't take fork() call properly.
Here is the test code:
import java.io.IOException;
public class prova {
public static void main(String[] args) throws IOException {
Runtime.getRuntime().exec("ls");
}
}
This code has only one line, but when I tried to run it, I got below error message:
Exception in thread "main" java.io.IOException: Cannot run program "ls": error=12, 无法分配内存
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at java.lang.Runtime.exec(Runtime.java:620)
at java.lang.Runtime.exec(Runtime.java:450)
at java.lang.Runtime.exec(Runtime.java:347)
at prova.main(prova.java:6)
Caused by: java.io.IOException: error=12, 无法分配内存
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 4 more
Obviously, java will not be able to load any native executable.
Is there any way to do with this?
The text was updated successfully, but these errors were encountered:
metorm
changed the title
Is it possible to make java Runtime.getRuntime().exec to work properly in WLS (bash on windows) ?
Is it possible to make java Runtime.getRuntime().exec to work properly in WLS?
Nov 27, 2016
Hi @metorm -- I assume you're referring to "WSL" ("Windows Subsystem for Linux")? This sounds similar to #1403 . Could you try the workaround on that ticket?; does it help you?
I managed to run xfce4 properly on WLS, i.e. bash on windows 10. Everything was find until I tried to run Pycharm/liclipse on it.
The GUI loaded normally, but both IDE failed to run python executable. The error message says
I spent some time on the maximum allowed memory of JVM, but it turned out that the problem was caused by WLS, it seems that WLS doesn't take
fork()
call properly.Here is the test code:
This code has only one line, but when I tried to run it, I got below error message:
Obviously, java will not be able to load any native executable.
Is there any way to do with this?
The text was updated successfully, but these errors were encountered: