Java编译器ASP.NET [英] java compiler ASP.NET

查看:67
本文介绍了Java编译器ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试使用ASP.NET C#为Java创建在线编译器


Hi,
I''m trying to make an online compiler for java using ASP.NET C#


Process p=new Process();
p.StartInfo.FileName = "C:\\Program files\\Java\\bin\\javac.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.Arguments = "C:\\Hello.java";
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardOutput.ReadToEnd();
p.WaitForExit();



我运行javac.exe来编译Hello.java,但是ASP.NET不允许将该过程写入Hello.class到磁盘

但是在不使用ASP.NET的情况下通过cmd.exe手动执行或仅使用C#进行编程时,它运行得很好

您可以帮我使用ASP.NET或PHP制作在线Java编译器吗?



I run javac.exe to compile Hello.java, but the process isn''t allowed by ASP.NET to write Hello.class to disk

But on doing it manually through cmd.exe without using ASP.NET or progmatically using C# only it runs perfectly

Can you help me make an online java compiler using ASP.NET or PHP?

推荐答案

尝试一下:

什么是在线编译器?联机IDE? [
Try this:

What are Online Compilers & Online IDEs?[^]

hope it helps :)


您的Web应用程序使用受限制的凭据运行,因此,如果不先给Web用户提供更高的凭据,就无法执行文件写入等操作.这不是一个好主意,但有时是必要的.
Uday的答案为您提供了有关该主题的一些很好的信息.
Your web application runs with restricted credentials, so you can''t perform file writes and such things without first giving your web user elevated credentials. That is not a good idea, but sometimes necessary.
Uday''s answer provides you with some very good information on the subject.


这篇关于Java编译器ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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