系统找不到指定的文件 - 尝试运行Java.exe

时间:2012-02-26 01:57:06

标签: c# java windows-server-2008

以下是抛出错误的代码:

// Run compiler
Process p = System.Diagnostics.Process.Start("java.exe", ex);
p.WaitForExit();

这是一台新服务器(Windows 2008 R2,IIS7.5),我安装了Java Runtime 7.

我还将系统属性中的环境变量JAVA_HOME设置为C:\Progra~1\Java\jre7,如下所示: http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows

但它没有任何区别。

有什么想法吗?完整的错误是:

[Win32Exception (0x80004005): The system cannot find the file specified]
   System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +921
   System.Diagnostics.Process.Start() +131
   System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +45
   Arcade.UploadFunctions.minifyC2Runtime(Int32 GameID) +334
   Arcade.GameFunctions.createGame(Int32 CatID, String Name, String Description, String Instructions, Int32 UserId, Int32 Width, Int32 Height, Int32 ParentGameID) +1345
   ArcadeSubmit.submitGame(Object sender, EventArgs e) +1331
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +113
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5352

0 个答案:

没有答案