Friday, November 19, 2010

How to open a jar file in VB?

I just want VB to open a ******* JAR file that is in the same folder, how limited is VB?! I'm not a VB developer, but a Java developer, I just want people to install the software and open it as an exe file! BTW: I'm really tired, I've been up all night programming a server software in Java...How to open a jar file in VB?
Make sure you ';Import'; System.Diagnostics at the top of the file

The documentation can be found here: http://msdn.microsoft.com/en-us/library/鈥?/a>





Dim processStartInfo As New ProcessStartInfo(';someFile.jar';);

processStartInfo.CreateNoWindow = true;

processStartInfo.UseShellExecute = false;





Dim process As Process = Process.Start(processStartInfo);

process.WaitForExit();



Dim exitCode As Integer = Process.ExitCode;



' Do something with ExitCode if you want



process.Close();



BTW, if you are a Java developer you should consider using C# if possible. It can ';talk'; to any code developed in VB and the syntax is almost identical to Java.
  • advice for door installation
  • No comments:

    Post a Comment