473,473 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Calling Windows Exe from within Java prog

Hi can anybody help me here -

I have a command string that I'm building in Java to call a windows program.

Can anybody point me to some example code.

Thanks

Kevin
Jul 17 '05 #1
3 4622
Kevin Passey wrote:
Hi can anybody help me here -

I have a command string that I'm building in Java to call a windows program.

Can anybody point me to some example code.

Thanks

Kevin


See JNI. http://java.sun.com/docs/books/tutorial/native1.1/

--
Thanks,
Elliott C. Bäck
---------------------------------
www.elliottback.com/blog/
www.spreadIE.com
Jul 17 '05 #2
On Wed, 13 Oct 2004 18:47:43 GMT, Elliott Back wrote:
Kevin Passey wrote:
I have a command string that I'm building in Java to call a windows
program.

Can anybody point me to some example code.


See JNI. http://java.sun.com/docs/books/tutorial/native1.1/


JNI is overkill for what he's asking. Use Runtime.exec() instead.

/gordon

--
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
Jul 17 '05 #3
Thanks Guys,

I did it like this:-

String cmdOut = commandLine.toString();

Runtime.getRuntime().exec( cmdOut );

Kevin

"Elliott Back" <el*****@cornell.edu> wrote in message
news:jL*********************@twister.nyroc.rr.com. ..
Kevin Passey wrote:
Hi can anybody help me here -

I have a command string that I'm building in Java to call a windows program.
Can anybody point me to some example code.

Thanks

Kevin


See JNI. http://java.sun.com/docs/books/tutorial/native1.1/

--
Thanks,
Elliott C. Bäck
---------------------------------
www.elliottback.com/blog/
www.spreadIE.com

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raskolnikow | last post by:
Hi! I have some beginner questions about C++, so please be gentle if the things I ask are trivial. What I want to do is a program that - changes the current (system) date, - calls an...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
12
by: johny smith | last post by:
I am trying to figure out a way to print the address of what called a certain function once inside the function. I am assuming that this information is on the stack somewhere. But can someone...
7
by: Klaus Friese | last post by:
Hi, i'm currently working on a plugin for Adobe InDesign and i have some problems with that. I'm not really a c++ guru, maybe somebody here has an idea how to solve this. The plugin is...
4
by: Anita C | last post by:
Hi, Can one call a c# function from within a javascript function ? I have a c# function GetLanguageItem(title), how can I call the above function from a javascript function in an .aspx page....
0
by: balaji krishna | last post by:
Hi, I need to handle the return set from COBOL stored procedure from my invoking Java program. I do not know, how many rows the stored proc SQL fetches.I have declared the cursor in that proc, but i...
1
by: amgupta8 | last post by:
Note: This problem occurred when I updated the JDK from 1.3.1 to 1.4.1 or 1.4.2. Nothing else was changed in the code, other than updating the JDK on the database server (dbm cfg parm jdk_path) and...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
2
by: a6a6 | last post by:
Hello all.. Here is my story, I have recently encountered a bad case of malware , (vundo virtualmonde etc.) It was a bit of a pain in the rear to shake loose but I managed to get it done.... I...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
1
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...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.