Runtime.getRuntime().exec(String cmd)
解决方案 »
- 两个项目互相调用
- 各位高手帮忙分析下?
- org.hibernate.exception.SQLGrammarException异常问题
- java乱码编码转码问题
- 怎样取得spring bean中的property值?
- freemark 如何处理从数据库拿出的null对象
- hibernate使用时出错,各位帮忙看看
- tomcat配置多域名(高手请进)
- 怎样在tomcat下进行jms开发
- spring boot shiro 每次登陆都会报这个错,但不影响功能是什么原因?
- 庆祝分论坛开通,放出easy struts 配置及开发过程的屏幕录像
- 有2年经验的 J2EE/JSP/MySQL 的开发高手,要多少银子?谢了!
然后即可以运行了,而且在JBuider中运行不行,打包成 exe文件就右以运行了。
要知道这个bat文件可不可以直接运行,只要进入Dos 窗口,然后再运行程序的完全路径如:
在C盘根据目录下运行 c:\tomcatc\bin\startup.bat 如果系统变量中没有CATALINA_HOME,应付提示出错。
但如果你进入c:\tomcat\bin\ 目录下再运行 startup.bat 就可以。因为它会在当前目录下找到需要的文件。希望上面的信息能能你以帮助。
The Runtime.exec methods may not work well for special processes on certain native platforms, such as native windowing processes, daemon processes, Win16/DOS processes on Win32, or shell scripts. The created subprocess does not have its own terminal or console. All its standard io (i.e. stdin, stdout, stderr) operations will be redirected to the parent process through three streams (Process.getOutputStream(), Process.getInputStream(), Process.getErrorStream()). The parent process uses these streams to feed input to and get output from the subprocess. Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.