Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 26th, 2012, 02:27 AM
shabber102 shabber102 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2012
Posts: 1 shabber102 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 24 sec
Reputation Power: 0
Unhappy Executing script file

Hi All,

I need some information, could you please help me out.

I have a perl file at the location : D:\Work\Perl\Practice\hello.pl

I want to call this perl file in a java program, so in my java file i write below code in try catch block

Runtime r= Runtime.getRuntime();
Process p1=r.exec("cmd /C perl D:\\Work\\Perl\\Practice\\hello.pl");
Although code does not through exception, but the perl file does not perform the required action.

As it is supposed to create a file which it does not. And when i execute the perl file from command prompt then action is performed perfectly.

Any input on this ?Thanks & Regards,
Shah

Reply With Quote
  #2  
Old February 10th, 2012, 12:32 PM
jdwebwolf jdwebwolf is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 2 jdwebwolf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 59 sec
Reputation Power: 0
Two thoughts

1. Does the user that the java interface runs as have access to create files in that locations. Access rights are easily forgotten.

2. If that does not fix it, you can do one of two things:
a) Have the script do something benign (and stupid) to let you know that it is running (a bell sound '\a').
b) Run an instance of Process Explorer to validate that the script is being called.

Hope this helps.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Executing script file


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap