wood burning stoves 2.0*
The moose likes Java in General and the fly likes How to pass arguments to a vb exe using Java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to pass arguments to a vb exe using Java program" Watch "How to pass arguments to a vb exe using Java program" New topic
Author

How to pass arguments to a vb exe using Java program

Umesh Kilkile
Greenhorn

Joined: Mar 31, 2010
Posts: 11
Hi,

I've one exe which is written in VB. I've to invoke that exe and pass a path as a argument using java program.

Thank You,

Umesh
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Reading this might help.


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Abhijeet Ravankar
Ranch Hand

Joined: Mar 15, 2009
Posts: 62
Here I try to invoke notepad.exe and pass the path of the file to open. Try it with your VB program. I think it should work.
You can later kill the VB program too.

Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
p.destroy()???

You are better reading the Daconta paper which Martin Vanyavchich quoted. The ProcessBuilder class introduced in Java5 makes it a bit easier by combining Streams, but the principles are unchanged from Daconta.
Abhijeet Ravankar
Ranch Hand

Joined: Mar 15, 2009
Posts: 62
@Campbell Ritchie: Thanks. But can we destroy a process using ProcessBuilder class (without using Process class)? Please share a better way to it.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11422
    
  16

Diwas Pathak,
Your post was moved to a new topic.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
wood burning stoves
 
subject: How to pass arguments to a vb exe using Java program