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.