Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Run Batch File From Jar

Reply
Thread Tools

Run Batch File From Jar

 
 
Badshah
Guest
Posts: n/a
 
      05-02-2006
Hi Friends ,

I Am A Java Programmer. I Am Developing A Program Which Will Call A
Batch File And I Have Added That Batch File In Jar. But It Is Not
Working. It Is Working Very Well Outside Jar File.
Is Batch File Not Callable From Within Jar File ? If Yes What Else Can
I do ?
Suggestion Required

ThankYou ,
Sohil Surti

 
Reply With Quote
 
 
 
 
Alexandre Touret
Guest
Posts: n/a
 
      05-02-2006
Badshah wrote:
> Hi Friends ,
>
> I Am A Java Programmer. I Am Developing A Program Which Will Call A
> Batch File And I Have Added That Batch File In Jar. But It Is Not
> Working. It Is Working Very Well Outside Jar File.
> Is Batch File Not Callable From Within Jar File ? If Yes What Else Can
> I do ?
> Suggestion Required
>
> ThankYou ,
> Sohil Surti
>

Hello,
could you put your code (especially the call) on reply?
I think, the problem is due to the call of the resource which is inside
of the JAR...

Regards,
Alexandre
 
Reply With Quote
 
 
 
 
Alex Buell
Guest
Posts: n/a
 
      05-02-2006
On Tue, 02 May 2006 09:15:16 +0200 Alexandre Touret
<(E-Mail Removed)> waved a wand and this message magically
appeared:

> > I Am A Java Programmer. I Am Developing A Program Which Will Call A
> > Batch File And I Have Added That Batch File In Jar. But It Is Not
> > Working. It Is Working Very Well Outside Jar File.
> > Is Batch File Not Callable From Within Jar File ? If Yes What Else
> > Can I do ?


You Don't Need To Capitalise Every First Letter In Each Word, Just The
First Letter In A Sentence Will Be Enough, Thank You.

--
http://www.munted.org.uk

Take a nap, it saves lives.
 
Reply With Quote
 
Badshah
Guest
Posts: n/a
 
      05-02-2006
Process p =
Runtime.getRuntime().exec(System.getProperty("user .dir")+"\\MySqlDBA\\Restore.bat
"+ Tdatabase.getText() + " " + Tuser.getText() + " " +
Tpassword.getText() + " " + Tpath.getText().trim());
p.waitFor();

This Is The Code I Am Using To Make Call To Batch File.

This Is Content Of Restore Batch File.

cd c:\program files\mysql\mysql server 5.0\bin
mysql %1 --user=%2 --password=%3 < %4

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute Jar file using Batch file. Sriram Java 1 01-31-2008 03:59 PM
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments