File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 36479
    
  16
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: 10916
    
  12

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass arguments to a vb exe using Java program
 
Similar Threads
How to call exe using Java program
Problem in Executing .exe file using Script
Running an .exe from a Java program
Running an external file on a button click
invoking c exe from java