How to execute external file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I wrote a java console program. But, I am not familiar with Swing to write
the GUI.

I want to use C# to write the GUI, e.g. a start and a stop buttons.

When I click the start button, it execute the jar file. Or, I wrote a batch
file and let the GUI to run it.

So, how should I write the eventhandler to execute the external program?

Thanks for help.
 
Tom said:
Hi,

I wrote a java console program. But, I am not familiar with Swing to
write the GUI.

I want to use C# to write the GUI, e.g. a start and a stop buttons.

When I click the start button, it execute the jar file. Or, I wrote a
batch file and let the GUI to run it.

So, how should I write the eventhandler to execute the external
program?

The class System.Diagnostics.Process allows you to run other programs.

If you're only using JDK 1.1 APIs in your Java application, you could
recompile it using J# to a .NET assembly and use it as regular DLL...

Cheers,
 
The class System.Diagnostics.Process allows you to run other programs.
If you're only using JDK 1.1 APIs in your Java application, you could
recompile it using J# to a .NET assembly and use it as regular DLL...

I use JDK 1.4.1 in my java program.

May I ask how can I run the jar program as a service on windows 2000 server?
 
Tom said:
I use JDK 1.4.1 in my java program.

May I ask how can I run the jar program as a service on windows 2000
server?

I haven't looked into service development in detail, but the .NET framework
has good support for developing services. On the other hand, there are
(freely avalibale) tools that let you execute any Win32 application as a
service.

Cheers,
 
Back
Top