在服务器端运行.exe [英] Running .exe on Server Side

查看:102
本文介绍了在服务器端运行.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从GWT上的服务器端运行.exe,但它给了我一个拒绝访问的错误.Exact error is: -


$ b


java.security.AccessControlException:

处访问被拒绝(java.io.FilePermission
<>执行)java.security.AccessControlContext.checkPermission(Unknown
Source )at
java.security.AccessController.checkPermission(Unknown
Source)at
java.lang.SecurityManager.checkPermission(Unknown
Source)at
com.google。 appengine.tools.development.DevAppServerFactory $ CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at
java.lang.SecurityManager.checkExec(Unknown
Source)at
java.lang .ProcessBuilder.start(未知
源)在
java.lang.Runtime.exec(未知源)$ b $在java.lang.Runtime.exec(未知
源) p>

这是错误打印的内容 - >错误===访问被拒绝(jav a.io.FilePermissionALL FILES执行)



我甚至试图通过
更改文件的安全权限(更改java.policy文件


grant {rel =nofollow noreferrer> Here )但它仍然给出相同的错误。权限
java.io.FilePermissionC:\Documents
和Settings \User\Desktop\ABCD.exe,
execute; };

我有
也尝试将它放在/ war / WEB-INF下,但徒劳无功。网络让我意识到谷歌应用引擎可能是造成这种情况的原因。
有人可以帮我吗?

p.s.我看到一个类似的帖子(Here),其中提到,应该可以在服务器上这样做

解决方案

你的问题不在于GWT,而在于应用引擎开发环境。 Google App Engine Environment的设计考虑了可扩展性,因此应用程序完全从服务器硬件到操作系统的所有内容都被抽象出来。



总之,你尝试的东西在GAE上是无法实现的。



如果这个问题无论如何都与<这个,如果你的目标是一个快速和肮脏的GWT原型,并不打算部署appspot.com,那么你可以尝试一个没有GAE的普通GWT项目。 Runtime.exec命令应该在没有任何调整的情况下在jetty上正常执行(只要您创建了只有GWT和GAE支持的Web应用程序项目)。
$ b 这就是说,如果您的目标是在App Engine上运行,那么你完全是朝着错误的方向前进。你试图达到的是不可能的。

I am trying to run a .exe from the server side on GWT but it is giving me a access denied error.Exact error is :-

java.security.AccessControlException: access denied (java.io.FilePermission <> execute) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166) at java.lang.SecurityManager.checkExec(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source)

and this is what is printed in error->"error===access denied (java.io.FilePermission "ALL FILES" execute)"

I even tried to change the security permissions of the file by changing the java.policy file(Here) but it still gives the same error.I added these lines -

grant { permission java.io.FilePermission "C:\Documents and Settings\User\Desktop\ABCD.exe", "execute"; };

I have also tried to place it under /war/WEB-INF but in vain.Some searching on the net led me to the fact that google app engine might be the cause for this . Can someone help me with this?
p.s. I saw a similar post (Here )which mentions that something like this should be possible on the server side.

解决方案

Your issue is not with GWT but the app engine development environment. Google App Engine Environment is designed keeping in mind scalability, hence the application is totally abstracted from everything ranging from the server hardware to the operating system.

In short what you are trying is not achievable on GAE.

If this question is anyway related to this, and if your objective is a quick and dirty GWT prototype with no intention to deploy on appspot.com then you may try a plain GWT project without GAE. Runtime.exec command should execute normally on jetty without any tweaking (provided you create the web application project with just GWT and no GAE support).

That said if your objective is to run on App Engine, then you are totally headed in the wrong direction. What you are trying to achieve is impossible.

这篇关于在服务器端运行.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆