Under a GUI, I need to run a perl script, how to do this?

Hi - I am writing a GUI for my clients and one of the things my program must do is run a perl script. I am able to run perl.exe but it seems like perl.exe is not running the script. I also tried to put the perl script in a batch file and then call the batch file from my java GUI program. I still get the same issue of just perl.exe running but thats not running the script. My last attempt was to write a small class to test if perl.exe can run the script under a command line. I got the perl.exe to run the perl script but how do I but implement that class in my GUI if my test class needs a command line? How can I run a command line in my GUI so the perl script can be run.
The Runtime.getRuntime.exec(RunPerlScript) is not working like I want it.
I also tried Runtime r = Runtime.getRuntime();
Process p = r.exec(RunPerlScript);
How can I run the MS-DOS prompt from my program if the Runtime Environment is running already. The Runtime Environment seems to not allow another prompt to be opened and from there I can run the perl script manually or automatically from my program.
What does the "cmd /c start..." or "c:\\windows\\command.com..." do? I have seen that in the forum but it doesn't seem to be running the perl script. The perl.exe runs, but not the perl script. I need anyones help desperately. Damn microsoft, why did they remove completely the functionality of DOS. I have a feeling my program will run perfectly under a UNIX environment, because I needed to do was open another shell. Thats what I need in windows!
Thank you for your help.
Seigot

hi
I am working on this perl scripts do run on GUI's well the process command is fine try java 1.3 it works fine. if u need more help let me know
all the best

Similar Messages

  • I have windows running on my mac laptop, i want to install parrells as i need to run some specialist software - how do i do this?

    I have windows running on my mac laptop, i want to install parrells as i need to run some specialist software - how do i do this?

    You mean you don't want to dual boot to run the program in Windows?
    Have you looked in the Boot Camp forum? you can run the software already natively in Windows. Parallels just lets you run Windows under or side by side with Mac OS (sharing memory and processing resources).
    Parallels of course uses the SAME Windows partition you already have (usually, unless you want to buy and install a 2nd copy of Windows and create a VM).

  • How to run the perl script from java ?

    Hi , I need to run the pearl script from the server and to get the result of the script thro' java using SSH
    Is there any 3rd party SSH API in java ?
    Please help me out
    thanks in advance
    karthik

    This seems like a very strange thing to want to do.
    What is the perl script doing?
    Do other programs (not some shell script) access this server-side perl script from a different machine?
    If so how do they do it?
    What currently triggers the perl script to execute?
    What currently handles the output from the perl script?
    If you can answer these questions (and understand the answers) you should be able to come up with a different approach to this.
    You do not really want to call a remote perl script from a Java program, you want to achieve the effect you think that would have if you could do it.
    So find the answers to the above questions, write them on 3" x 5" cards and lay them out on your desk.
    What flow of control needs to happen? Which piece of code needs to produce or consume which piece of data?
    If that fails, ask you self or who ever is making you do this what are the use-cases?
    If you do not know what use-cases are or do not understand them well enough try reading
    Use Case Modeling (The Addison-Wesley Object Technology Series) by Kurt Bittner and Ian Spence (Paperback - Aug 30, 2002)
    http://www.amazon.com/s/ref=nb_ss_gw/002-7908514-4043267?url=search-alias%3Dstripbooks&field-keywords=use+cases&x=0&y=0
    It is a short and easy to read book on the subject and also one of the best.
    You MUST understand WHAT you are trying to achieve before you can decide HOW you are going to achieve it.

  • I cannot download what´s app on my iphone 4. I first need to update my software. How to do this on my i phone 4?

    I cannot use what´s app on my i phone 4. I first need to update my software. How to do this on my i phone 4

    Connect it to iTunes on a computer and check for updates. Alternatively, if it's running iOS 5 or newer, use the Software Update function on the device itself.
    (73565)

  • Is there any possibility running a Perl Script in JSP?

    Is there any possibility running a Perl script in JSP and get the value of the JSP variable? The JSP page is running in TOMCAT 5.0 server.

    i am created one script .... i want to replace it the older one ... it is possible in development server ..... is there any possibility to assingn the form in quality server ?????
    is there any other way to assign the form to transaction with out using NACE?.
    Well regarding you question about the system to have it assigned, ideally you need to assign it in development and mopve it up stacks. However, i aint sure of the roles you are assigned with for doing any config changes in QS. and the config needs to be done through NACE. Following is the process.
    You need to first find the Output type and the standard form attached to the existing program/ tcode. This info can be fetcehd from TNAPR table. Once you have got the details, you can then get into NACE tcode to configure your new custom form instaed of the existing Standard one. Get the application type, output type from TNAPR table. Then select the particular outpput type in NACE nad click on processing routine. This is the place where the new form name needs to be updated.
    Hope this helps!
    Cheers!
    Varna
    Edited by: Varna17 on Sep 24, 2009 7:10 AM

  • Running a Perl script

    I have two things I need to do. First is, figure out how to run a perl script. Second, I need to use the cron to run it every 2 hours.
    How would I do both of these?

    crontab -e
    0 0-23/2 * * * curl "http://... "
    Will run the command every 2 hours on the hour. If you want to run a quarter after the hour then
    15 0-23/2 * * * curl "http://... "
    Change the first number to whatever minute after the hour you want the cron job to run.
    See the man page
    man 5 crontab

  • Gui freezes during execution of a perl script which is never completed

    Dear Java programmers,
    I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?
    thanks in advance,
    Tom

    tevang2 wrote:
    I'm running a perl script which takes a few minutes to finish from a GUI. But when the execution reaches a point, it suddenly seems to stop and the GUI becomes irresponsive. Then you're tying up the Swing EDT, the event dispatch thread, which is the single thread responsible for drawing the Swing app and responding to user input.
    Submitting the perl script to run as a separate thread to release the button doesn't make any different either. Is there any restriction in the time that swing allows external programs to run?None that I know of. I still have to wonder if you are creating a background thread properly because even if your perl script gets locked, if you are running it on a background thread, the Swing app shouldn't lock up.

  • My iphone 4s is over 2 years old and I need to replace the battery. How much will this cost at an Apple store?

    I have an iphone 4s that is  over 2 years old. The phone's battery is no longer able to hold a  charge for an acceptable length of time.  Assuming I need to replace the battery, how much will this cost at an Apple store?

    graciebethgrant wrote:
    Basically, I'm new to Apple, despite using them before, but I've never actually owned my own.
    Since buying this phone off a colleague at work, I seem to be having problems with it. First, I noticed how rubbish the battery life is, then my charger almost went up in flames and thirdly my camera lense is scratched beyond belief.
    I know the phone isn't within warranty, although I was lead to believe it was before and during buying it, so basically I'm extremely disappointed with the general make up of iPhone's considering they cost such a **** of a lot of money, you'd think they'd be built to last.
    Back to my main point, how much would it cost for a new battery? Or a new camera lense if anyone can help me with that? (I know that the back of the phone was refurbished just before my buying it, so literally just the camera lense)
    Thanks!
    So basically it sounds like you bought an abused used iPhone and somehow that makes the phone subpar because dispite the abuse it should still last forever and look like new? Batteries don't last forever, even under ideal conditions, so your expectatoins are unrealistic. Take it in and have an estimate done.

  • How to run NMS perl scripts in SunONE 6.1

    Any one have info on running the NMS perl scripts with the perl compiler shipped with 6.1? Particularly interested in nms FormMail. I need to get it running in on windows xp and Sun Solaris.
    WebServer is reporting the following error.
    failure: for host dbmrpm41.deluxe.com trying to POST /cgi-bin/FormMail.pl, cgi_s
    can_headers reports: HTTP4044: the CGI program C:\Sun\WebServer6.1\bin\https\per
    l\perl.exe did not produce a valid header (program terminated without a valid CG
    I header. Check for core dump or other abnormal termination)
    When I run FormMail.pl in a command prompt, I receive the following:
    Can't locate auto/POSIX/autosplit.ix in @INC (@INC contains: C:/Sun/WebServer6.1
    /bin/https/perl/lib/MSWin32-x86 C:/Sun/WebServer6.1/bin/https/perl/lib) at C:/Su
    n/WebServer6.1/bin/https/perl/lib/AutoLoader.pm line 146.
    at C:/Sun/WebServer6.1/bin/https/perl/lib/MSWin32-x86/POSIX.pm line 5
    Edited by: garyb on Mar 18, 2008 9:04 AM

    The Perl you found in the bin/https/perl directory is a private copy of Perl used to implement parts of the Web Server Administration Server. You shouldn't try to use it to run CGI scripts.
    Instead, you can download your own Perl distribution. ActiveState has a Perl distribution called ActivePerl. You can get it for free from http://www.activestate.com/Products/activeperl/. Other options are listed at http://win32.perl.org/.

  • HT2711 ry space available  and I am told my start up disc need repairing-I don't know how to do this-also the trash wont empty - HELP

    I have a OS X 10.6.8 Mini Mac - I cannot empty my trash so went to Disk Repair and had a message that my start up disc need repairing - do not know how to do this - also I have a message saying my Start Up disc has no more Memory Spave available for application memory. HELP - I am not very computer literate so please use simple language, thanks

    One stage at a time!
    1. Can't empty trash:
    http://support.apple.com/kb/HT1526?viewlocale=en_US
    2. Repairing permissions is important, and should always be carried out both before and after any software installation or update.
    Go to Disk Utility (this is in your Utilities Folder in your Application folder) and click on the icon of your hard disk (not the one with all the numbers).
    In First Aid, click on Repair Permissions.
    Background information here:
    http://support.apple.com/kb/HT1452?viewlocale=en_US
    and here:
    http://docs.info.apple.com/article.html?artnum=302672
    An article on troubleshooting Permissions can be found here:
    http://support.apple.com/kb/HT2963
    By the way, you can ignore any messages about SUID or ACL file permissions, as explained here:
    http://support.apple.com/kb/TS1448?
    If you were having any serious problems with your Mac you might as well complete the exercise by repairing your hard disk as well. You cannot do this from the same start-up disk. Reboot from your install disk (holding down the C key). Once it opens, select your language, and then go to Disk Utility from the Utilities menu. Select your hard disk as before and click Repair.
    Once that is complete reboot again from your usual start-up disk.
    More useful reading here:
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck
    http://support.apple.com/kb/TS1417?viewlocale=en_US
    For a full description of how to resolve Disk, Permission and Cache Corruption, you should read this FAQ from the X Lab:
    http://www.thexlab.com/faqs/repairprocess.html
    Apple's advice on general maintenance:
    http://support.apple.com/kb/HT1147?viewlocale=en_US
    3. Lack of free space on your hard drive: if this drops below about 15GB you can run into problems like data corruption and general slowness.
    How big is your hard drive, and how much free space do you actually have?

  • I Need Help i have no idea how to fix this issue, but basically i bought my iphone 4 from amazon and i factory reset it and put the 02 simcard that it required, then once doing this im now stuck at the activation screen as it says "please put the appleID"

    Where do i go from here i do not know what to do as i have been trying to contact the person i bought it from but they have given me no reply i need advice on how to get this problem solved, i do have the email confirmation is that enough to get apple to deactivate it from the persons Icloud

    Until that person help you, the iPhone is a dead weight. We can't help you with this. This is the new activation lock feature to prevent stolen iPhone from activating.

  • Running a perl script outside local directory

    so i have been trying to write a java program that calls a certain perl script "helloworld.pl" using the runtime.exec method.
    Runtime.getRuntime().exec("perl helloworld.pl");the problem comes in when i attempt to run a helloworld.pl that is not in the local directory.
    Runtime.getRuntime().exec("perl C:/helloworld.pl");how would i properly execute the line of code above?

    and since 'perl' will pick up files from the current working directory you can also use
    Process process = Runtime.getRuntime().exec("perl helloworld.pl", null, new File("C:\\"));  // or whatever directory is your perl program is in.P.S. You should read thoroughly the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and implement ALL the recommendations.

  • Need help running a Python script when DVD inserted

    We had an intern that created a custom Python script to rip our old event recording DVDs back to a digital format. The script creates a JSON description file and asks a set of questions to create the metadata in the JSON file (e.g. Date of event).
    The way the intern set this up was that you'd click on the Python script which would open a terminal window where you fill in the metadata. It then asks if the DVD is in the computer. At this point you place the DVD in. A few seconds later, the Python script notices the DVD and proceeds to rip the DVD at our specific file size requirements along with the inputted metadata.
    We then upgraded the Mac from Mountain Lion to Lion and the script stopped working. Our intern has since left. I have now moved the Python script onto my Mountain Lion Mac. The intern's last message to me was that he had written an AppleScript that ran when the DVD was inserted which then referred to the Python script. The intern has since stopped replying to emails.
    This is a very important project that I would like to continue. Any help would be greatly appreciated!

    well, oddly, that should never have worked. 
    Try this:  open the applescript editor, copy in the following line:
    tell application "Terminal"
              do script "python /Users/medialab/dvddrip rename"
              activate
    end tell
    Save it, making sure that the 'File Format' pull down says Script (the new file will have a '.scpt' extension). You'll be able to select that file in the cd/dvd preferences.
    I assumed that you wanted this to open in terminal so that you can enter options on the command line. If that's not correct, let me know.

  • Help running a perl script

    I'm trying to setup UBH (usenet binary harvester). Nobodies made a pacman pkg for it yet, so I'm having to do it all myself. I try running it, but I get this error:
    [root@myhost ubh-2.5]# ./ubh
    Can't locate News/Newsrc.pm in @INC (@INC contains: /usr/lib/perl5/5.8.6/i686-linux-thread-multi /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./ubh line 1425.
    BEGIN failed--compilation aborted at ./ubh line 1425.
    I'm *guessing* it is becuase I am missing some required libraries. The readme says I need
    Net::NNTP (part of the libnet distribution)
    News::Newsrc
    Set::IntSpan (not used directly, required by News::Newsrc)
    MIME::Parser (from the MIME-tools distribution)
    MIME::Base64
    IO::Stringy
    The MailTools distribution
    So what pakaged do I need to download in order to get it to work?

    cuallito wrote:
    I'm trying to setup UBH (usenet binary harvester). Nobodies made a pacman pkg for it yet, so I'm having to do it all myself. I try running it, but I get this error:
    [root@myhost ubh-2.5]# ./ubh
    Can't locate News/Newsrc.pm in @INC (@INC contains: /usr/lib/perl5/5.8.6/i686-linux-thread-multi /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at ./ubh line 1425.
    BEGIN failed--compilation aborted at ./ubh line 1425.
    I'm *guessing* it is becuase I am missing some required libraries. The readme says I need
    Net::NNTP (part of the libnet distribution)
    News::Newsrc
    Set::IntSpan (not used directly, required by News::Newsrc)
    MIME::Parser (from the MIME-tools distribution)
    MIME::Base64
    IO::Stringy
    The MailTools distribution
    So what pakaged do I need to download in order to get it to work?
    hi,
    well it seems you need at least
    News::Newsrc
    and Set::IntSpan
    for others you may need, use the  search

  • In Aperture I have made a slideshow and now I would like to make a DVD of it. Under Export it does not give me a choice of how to do this?

    I have tried to save the slideshow to my desk top and then make a DVD from that and when I go to play it it says wrong file type or format. I tried twice. Saved as a .mov. then I tried to run it thru After Effects and have it as a .mp4 but still does not make a DVD.
    Any suggestions on how to make a DVD of the slide show?
    Thanks-

    @Sarchet: See this user tip by Karsten Schlüter for all the options of making a video DVD - you might give the free "Burrn" a try:
    How to create a video-DVD? (Macs without iDVD)
    Regards
    Léonie

Maybe you are looking for

  • Stopping podcasts from shuffling

    Hi guys - any ideas? I have selected the "keep from shuffling" box in the "get info" fields some of the pesky little s*ds keep cropping up. Thanks. Now this is really dumb, but just to play it safe: if your only advice is to create a huge smart playl

  • Delete record confirmation

    Hi: I am working with David Powers' "your first dynamic website" tutorial in preparation for an upcoming project. With a delete record behavior, how does one add a "Are you sure you want to delete" message? Thanks, Ned

  • How to import existing projects into JDeveloper 11g

    I am trying to work with JDeveloper for my application and want to know whether it is possible to import existing projects into the work space in JDeveloper. I am currently working with eclipse IDE and this feature is available in it. How can I conne

  • Problem to specify database access acount in sharepoint configuration wizard

    I installed sharepoint 2013 and run configuration wizard.  In the page "Specify Confguration Database Settings" and in the section "specify database access acount" I enter my domain admin account user (in DOMAIN\user_name format) and pass and I'm sur

  • DW cs4 -  something changed - font code colors

    Hello [history ] I have been using DW CS 4 for 16 months.  [Question ] Sometime in last two months the font code colors changed and are mostly blue.  I would like the code to have the variety of colors that it once had which made reading code possibl