我正在尝试为Minecraft服务器做一个前端,
我正在尝试将java.exe中的feed添加到文本框中。但是当我这样做时,我得到了前两行的饲料,然后就停止了,有人知道为什么吗?
If Not System.IO.File.Exists(txtServerLocation.Text + "\" + ServerFileName) Then
frmDownloader.Show()
wbcDownload.DownloadFile("https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar?", txtServerLocation.Text + "\" + ServerFileName)
frmDownloader.Close()
End If
Me.txtConsole.Text = String.Empty
Dim pi As New System.Diagnostics.Process()
With pi.StartInfo
.FileName = "C:\Program Files (x86)\Java\jre6\bin\java.exe"
.WindowStyle = ProcessWindowStyle.Normal
.UseShellExecute = False
.RedirectStandardOutput = True
.RedirectStandardInput = True
.CreateNoWindow = True
.Arguments = "-Xmx" + nudAllocatedRam.Value.ToString + "M -Xms" + nudAllocatedRam.Value.ToString + "M -jar " + ServerFileName ' + " nogui"
End With
pi.Start()
While (pi.HasExited = False)
Dim sLine As String = pi.StandardOutput.ReadLine
If (Not String.IsNullOrEmpty(sLine)) Then
Me.txtConsole.Text &= sLine & vbCrLf
End If
Application.DoEvents()
End While