472,145 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

How to execute external file?

Tom
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.


Nov 16 '05 #1
4 5377
Tom wrote:
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,
--
Joerg Jooss
jo*********@gmx.net
Nov 16 '05 #2
Tom
> 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?
Nov 16 '05 #3
Tom wrote:
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?


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,
--
Joerg Jooss
jo*********@gmx.net
Nov 16 '05 #4
Tom
FYI: http://www.geocities.com/j2exe/ is a good tool.
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Juan Manuel Alegría B. | last post: by
14 posts views Thread by technocrat | last post: by
4 posts views Thread by Michele Petrazzo | last post: by
19 posts views Thread by citronelu | last post: by
4 posts views Thread by =?Utf-8?B?TEJU?= | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.