首页 > 解决方案 > Runtime.exec() 在我登录之前无法在 Windows Server 中执行

问题描述

代码很简单:

Runtime.getRuntime().exec("c:\\path\\to\\exefile");

我从tomcat运行这段代码,它本身在cygwin中运行,操作系统是Windows Server 2016。我发现exe文件在我登录Windows之前不会运行,很奇怪。有任何想法吗?

标签: javaexec

解决方案


推荐阅读