Hello, I'm fairly new here and based on the help that i've seen people give I though this would be a great place to ask!

Basically, I'm new with coding, so I decided to work with Minecraft - specific a Minecraft Server Starter. It has a built in text box to display all the stuff that the console would normally display and an input tetbox to use commands.

I have it so you can either use the Normal Minecraft Server or a Bukkit server. Basically, when I run minecraft.jar it works perfectly, I get the Output from the console and I can input commands.
When I use craftbukkit.jar (bukkit) I get the Output of the console fine, but I can't input any commands... I can't figure out why it's doing this!

Honestly I have no idea what part could be causing the problem, so I'll post my whole Form.

Imports System.Net
Imports System.IO
Imports System.Diagnostics

Public Class Form1
    Dim WithEvents WC As New WebClient
    Private psi As ProcessStartInfo
    Private cmd As Process
    Private Delegate Sub InvokeWithString(ByVal text As String)

    Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
        ProgressBar2.Value = 0
        Button3.Text = "Updating..."
        If CheckBox1.Checked Then
            WC.DownloadFileAsync(New Uri("http://repo.bukkit.org/content/groups/repo/org/bukkit/craftbukkit/1.0.1-R1/craftbukkit-1.0.1-R1.jar"), "craftbukkit.jar")
            WC.DownloadFileAsync(New Uri("https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar?"), "minecraft.jar")
        End If

    End Sub
    Private Sub WC_DownloadProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs) Handles WC.DownloadProgressChanged
        ProgressBar2.Value = e.ProgressPercentage
        If e.ProgressPercentage = 100 Then
            If CheckBox1.Checked Then
                Button3.Text = "Bukkit Updated"
                Button3.Text = "Minecraft Updated"
            End If
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If java6.Checked Then
            psi = New ProcessStartInfo("C:\Program Files\Java\jre6\bin\java.exe")
        ElseIf java7.Checked Then
            psi = New ProcessStartInfo("C:\Program Files\Java\jre7\bin\java.exe")
        End If
    Dim systemencoding As System.Text.Encoding = _
        With psi
            .UseShellExecute = False  ' Required for redirection
            If CheckBox1.Checked Then
                .Arguments = "-Xincgc -Xmx1024M -jar craftbukkit.jar"
                .Arguments = "-Xincgc -Xmx1024M -jar minecraft.jar nogui"
            End If
            .RedirectStandardError = True
            .RedirectStandardOutput = True
            .RedirectStandardInput = True
            .CreateNoWindow = True
            .StandardOutputEncoding = systemencoding  ' Use OEM encoding for console applications
            .StandardErrorEncoding = systemencoding
        End With
    ' EnableraisingEvents is required for Exited event
        cmd = New Process With {.StartInfo = psi, .EnableRaisingEvents = True}
        AddHandler cmd.ErrorDataReceived, AddressOf Async_Data_Received
        AddHandler cmd.OutputDataReceived, AddressOf Async_Data_Received
    ' Start async reading of the redirected streams
    ' Without these calls the events won't fire

    End Sub
    ' This sub gets called in a different thread so invokation is required
    Private Sub Async_Data_Received(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
        Me.Invoke(New InvokeWithString(AddressOf Sync_Output), e.Data)
    End Sub

    Private Sub Sync_Output(ByVal text As String)
        txtConsoleOut.AppendText(text & Environment.NewLine)
    End Sub
    ' Sending console commands here
    Private Sub txtConsoleIn_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtConsoleIn.KeyPress
        If e.KeyChar = ControlChars.Cr Then
        End If
    End Sub

    Private Sub startTimer_Tick(sender As System.Object, e As System.EventArgs) Handles startTimer.Tick
        Label1.Text = "Starting Up..."
        If ProgressBar1.Value = 100 Then
            Label1.Text = "Running..."
        End If
    End Sub

    Private Sub stopTimer_Tick(sender As System.Object, e As System.EventArgs) Handles stopTimer.Tick
        Label1.Text = "Stopping..."
        If ProgressBar1.Value = 0 Then
            Label1.Text = "Stopped"
        End If
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
    End Sub

    Private Sub java6_Click(sender As System.Object, e As System.EventArgs) Handles java6.Click
        If My.Computer.FileSystem.FileExists("C:\Program Files\Java\jre6\bin\java.exe") Then
            java6.Checked = True
            MsgBox("Java 6 Not Found - Make sure you have it installed correctly.")
        End If
    End Sub

    Private Sub java7_Click(sender As System.Object, e As System.EventArgs) Handles java7.Click
        If My.Computer.FileSystem.FileExists("C:\Program Files\Java\jre7\bin\java.exe") Then
            java7.Checked = True
            MsgBox("Java 7 Not Found - Make sure you have it installed correctly.")
        End If
    End Sub

    Private Sub CheckBox1_CheckedStateChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckStateChanged
        If My.Computer.FileSystem.FileExists("craftbukkit.jar") Then
            CheckBox1.Checked = True
            MsgBox("Bukkit Not Installed!")
        End If
    End Sub
End Class

Have you tried narrowing this down to just the Process Start commands?
...maybe make a console app that JUST has the Process Start construction?

That way, you'll eliminate everything else.

After that, maybe separate the search for the java.exe into a separate class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.