473,569 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5452
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.Diagnost ics.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.Diagnost ics.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.Diagnost ics.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5177
by: Lance | last post by:
Hi All, I would like to read commands from a file and execute them in VB, something like reading str = "hello world" into VB and execute it. Any suggestions will be appreciated. Thanks, Lance
17
7434
by: David Hughes | last post by:
For example, in Python in a Nutshell, Alex Martelli shows how you can run a Windows (notepad.exe) or Unix-like (/bin/vim) text editor using os.spawnv(os.P_WAIT, editor, ) But how would you call the OS X text editor /Applications/TextEdit.app - which appears to be a whole directory inside /Applications? I'm sorry if the answer is blindingly...
2
3563
by: Juan Manuel Alegría B. | last post by:
Hi group I have been making a windows service to execute an external application. I use a timer control, I can execute the application but does't appear as a normal windows, just I see it in the windows task manager as a local service. I think it must appear as a normal process. Someone knows about it or has any idea? Juan Manuel...
8
32657
by: Greg Fierro | last post by:
I would appreciate any help from anyone with the following: I have an external program (window32 based) that I am executing with the VBA SHELL command. This program produces a text file which I have to read after the external program finishes. I use the transfertext method to read the file. The problem is that the SHELL command executes...
14
11110
by: technocrat | last post by:
db2 -t -v -f/home.../filename >output_file-name I have a java stored procedure..which has to run the above command...not sure how i can run this command through java.. any suggestions are appreciated..
4
4622
by: Michele Petrazzo | last post by:
Hi, I want to execute an external code, that become from a text file (pe), call a function inside it and get its return value: # ext_code.txt def funct2Call(): return True # test.py
2
5308
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on...
19
11301
by: citronelu | last post by:
Is it possible to execute a binary string stored within a python script as executable code ? The script is run under Windows, and the binary code (a full executable file) is stored in a variable in the script. I know I can use os.system() or os.popen() to run an external file, but these functions take as argument a string evaluated as...
4
8474
by: =?Utf-8?B?TEJU?= | last post by:
Good day, I would like to execute an external application from a web form created using ASP.Net. I'm using System.Diagnostics.Process. It works fine if it is notepad.exe but it is not able to execute even a simple VB.Net windows application. No error is being returned. The application just can't be opened (even it is not found inside Task...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
946
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.