VB Code End Process

How can I modify my code so that the java.exe *32 process stops that  you see in the screen print?

sc
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Try:

Import System.Diagnostics

...

For Each proc As Process in Process.GetProcesses()
    If proc.Name = "java" Then proc.Kill()
Next

Open in new window

0
 
Larry Bristersr. DeveloperAuthor Commented:
You put me on the right track.

This is what actually was the working code

            For Each jr In Process.GetProcessesByName("Java")
                Try
                    jr.Kill()
                Catch
                End Try
            Next
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.