I am trying to run maven from my java class based on this suggestion:
How to run maven from java?
Runtime.getRuntime().exec(\"mvn\");
Error 2 means that the executable cannot be found by the JRE environment. This means that the PATH environment variable does not contain the Maven binary directory.
2 choices here:
Alternatively, this could also be due to a permission denied, but it is less likely the case.