starting java application out of vb

yogi21

Newcomer
Joined
Apr 14, 2003
Messages
6
hey all

i want to start a java application out of my vb programm. i used the code below but it throws an exception. i don't know where the mistake is. can somebody help me?
thanx a lot

Dim myProcess As New Process()
myProcess.Start("C:\j2sdk1.4.0_01\bin\java.exe waveplay")
 
try this...
Visual Basic:
Dim myProcess As New Process()
myProcess = Process.Start("C:\j2sdk1.4.0_01\bin\java.exe waveplay")
 
Also, if you want to track the Exit of the process....
Visual Basic:
    Private WithEvents myProcess As New Process()

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        myProcess = Process.Start("C:\j2sdk1.4.0_01\bin\java.exe waveplay")

        myProcess.EnableRaisingEvents = True

    End Sub

    Private Sub myProcess_Exited(ByVal sender As Object, ByVal e As System.EventArgs) Handles myProcess.Exited
        MessageBox.Show("Thank you")
    End Sub
 
Back
Top