How to run Perl from Java

Hi,
I have a program written in Perl. I want to run the Perl program using Java. If there is a command which can allow me to call the perl program from Java program, please advise me.
regards

The most easy way is to use Runtime class to call "perl" to run your perl script.
String sCmd = "c:\\yourPerlScriptLoc\\yourPerlScript.pl";
Process p = Runtime.getRuntime().exec(sCmd);

Similar Messages

  • How to run openscript from Java?

    Hi!
    I have recorded a web script using OpenScript. But instead of doing the playback in the OpenScript environment, I want to run the script from regular Java code.
    Does anyone know how to do that?
    Basically what I have tried out, is copying the code from the Java code view in Openscript, into a class in my Java project and imported all the oracle.oats... jar-files into my build path. It compiles fine.
    Then I try to call;
    MyOpenscriptClassInstance.initialize();
    MyOpenscriptClassInstance.run();
    MyOpenscriptClassInstance.finish();
    The initialize fails on a NullPointer on the browser.launch(), so clearly some more setup is needed to get the script running.
    I found one useful tip here How to call openscript from a flat java file about an alternative method, but I do not have oracle.oats.jagent.applications.qos among my jar-files in C:\OracleATS\openscript\plugins, so I am not able to locate the JavaAgentWrapper-class, the ScriptResult-class and the RunParameters-class.
    If anyone could guide me in the right direction, I would be grateful.
    I am running OpenScript version 9.2.0.0 by the way.

    Hi again!
    I found theoracle.oats.jagent.applications.qos jarr file now, so I feel like I am getting closer. I also set up log4j (hopefully correct using this guideline: http://snippets.dzone.com/posts/show/3248).
    However, the execution fails with this error message:
    *[2011-02-09 14:43:45,960]ERROR 0[Thread-2] - oracle.oats.jagent.applications.qos.JavaAgentWrapper.run(JavaAgentWrapper.java:82) - runScript.bat can't be found at null\runScript.bat*
    There are errors when running the script.
    My code looks like this:
    package guiDriver;
    import oracle.oats.jagent.applications.qos.JavaAgentWrapper;
    import oracle.oats.jagent.applications.qos.RunParameters;
    import oracle.oats.jagent.applications.qos.ScriptResult;
    public class OpenScriptWrapper {
         private String m_jwgFile;
         private JavaAgentWrapper m_qos;
         private ScriptResult m_result;
         private RunParameters m_param;
         private static final String RESULT_FOLDER = "C:\\OracleATS\\OFT\\DatabaseChangeTest\\results";
         // the JavaAgent playback process is supposed to finish
         // within this duration specified by users.
         private static final long JAGENT_TIMEOUT = 90000L;
         public OpenScriptWrapper() {
              m_qos = new JavaAgentWrapper();
              m_jwgFile = getJWGFile();
              m_param = new RunParameters();
              m_param.setScriptJWGFile(m_jwgFile);
              m_param.setResultFolder(RESULT_FOLDER);
         private String getJWGFile() {
              return "C:\\OracleATS\\OFT\\DatabaseChangeTest\\DatabaseChangeTest.jwg";
         public void runJAWrapperWithTimeout() {
              m_result = m_qos.run(m_param, JAGENT_TIMEOUT);
              if (m_result == null) {
                   System.out.println("There are errors when running the script.");
                   return;
              System.out.println("Overall Result: " + m_result.getOverallResult());
              System.out.println("Overall Duration: " + m_result.getOverallDuration()
                        + "ms");
              System.out
                        .println("Result Report File: " + m_result.getCsvReportFile());
         public static void main(String[] args) {
              OpenScriptWrapper jaws = new OpenScriptWrapper();
              jaws.runJAWrapperWithTimeout();
    Tips anyone?

  • How to run report from java code

    I am a begginner in Oracle Reports. We have no AS installed, so we run reports either from Reports Builder or by calling rwrun. I would like to know how to embed report calling into java code , let's say into simple swing application. Some example code would be welcomed. Thanks.

    Hello,
    You can find examples in :
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_webservice.htm
    Oracle® Application Server Reports Services Publishing Reports to the Web
    10g Release 2 (10.1.2)
    B14048-02
    14 Using the Oracle Reports Web Service
    Regards

  • How to invoke Matlab from Java

    Hi, I want to pass some data generated from Java class to Matlab, then invoke Matlab from Java to run the computation program (file written in Matlab, myfile.m). I know Matlab can use classes generated from Java, how to drive Matlab from Java?
    I appreciate your help!
    yaya

    According to their documentation, you can't. Having said that, again according to their documentation, there are plans to support this in future releases.
    m

  • How to run notepad from a web application

    hi
    can any body know,how to run notepad from a web application under tomcat

    You already asked this question:
    http://forum.java.sun.com/thread.jspa?threadID=5150005&messageID=9561597
    Obviously running notepad on the clients PC is not possible (ignoring active x)

  • How to run expdp from client ?

    Hi All,
    I tried searching google and forums for my issue but to no avail > How to run expdp from client side ....like in my laptop.
    Because currently our PROD database server has no space for expdp dump file. So I want it directed to my laptop which has an extenal USB of 1TB harddisk...via client EXPDP
    import data using impdp command
    Posted on: 08-May-2012 11:36, by user: 841731 -- Relevance: 53% -- Show all results within this thread
    below command is correct or not? if it is not correct could you please send me the correct command. impdp user/pass@databasename schemas=sourceschemaname remap_schema=sourceschemaname:destinationschemaname ...
    System generated Index names different on target database after expdp/impdp
    Posted on: 30-May-2012 11:58, by user: 895124 -- Relevance: 43% -- Show all results within this thread
    After performing expdp/impdp to move data from one database (A) to another (B), the system name generated indexes has different ...
    [ETL] TTS vs expdp/impdp vs ctas (dblink
    Posted on: 08-May-2012 21:10, by user: 869578 -- Relevance: 39% -- Show all results within this thread
    (table : 500 giga, index : 500 giga), how much faster is TTS (transportable tablespace) over expdp/impdp, and over ctas (dblink) ? As you know, the speed of etl depends on the hardware capacity. (io ...
    Oracle Client
    Posted on: 21-Jun-2012 22:47, by user: Sh**** -- Relevance: 32% -- Show all results within this thread
    Hi Guys, Please can you guys elaborate the difference between Oracle Client and Oracle Instant Client. Also, please can you advise from where I can download the Oracle normal ...
    Oracle 10g Client
    Posted on: 05-Jun-2012 10:11, by user: dzm -- Relevance: 26% -- Show all results within this thread
    to search at oracle site and this forum, but i wasn't able to find a link to download the oracle 10g client. I really need especificaly the 10g version. Anybody know the link or another way to download ...
    9i client to access 11g database
    Posted on: 22-Jun-2012 07:31, by user: kkrm333 -- Relevance: 24% -- Show all results within this thread
    Hi, Can i access a 11g database using 9i client? Thanks,
    SQLplus in Oracle Client
    Posted on: 14-Jun-2012 00:36, by user: Tim B. -- Relevance: 24% -- Show all results within this thread
    Hi, I tried to install an 11g oracle client in linux. As I've compared the files with the files when you install using the oracle instant ...
    Re: Information on Oracle Client 11202-1.1.4-6
    Posted on: 05-Jun-2012 03:33, by user: 898763 -- Relevance: 23% -- Show all results within this thread
    Actually thats the client requirement
    Analysing the performance of a single client
    Posted on: 28-Mar-2012 02:05, by user: 880172 -- Relevance: 23% -- Show all results within this thread
    timeouts even on some of the simplest queries. I want to try and get some data about how just this one client is performing and what it’s doing, but everything Google has thrown up so far is orientated around ...
    to make client connection as sys
    Posted on: 12-Jun-2012 22:04, by user: user11221081 -- Relevance: 23% -- Show all results within this thread
    Dear gurus can i connect to my server from my client machine with sysdba without giving sys password i have connected in different ways as sys@abc ...Thanks a lot.

    Though you can initiate the binary from your client side but for the file creation, there is no other way but to store it on the server side. So your best bet would be to get some space free on the server side of yours.
    Aman....

  • How to run report from form using run_object_report

    I AM USNING FORMS9I/REPORTS 9I , HOW TO RUN REPORT FROM FROM USING RUN_REPORT_OBJECT AND HOW
    TO PASS PARAMETER AS WE DID IN RUN_REPORTS PLEASE HELP ME

    here an example !
    I hope this example you can use it
    PROCEDURE pr_reporte IS
    BEGIN
    DECLARE
         repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status Varchar2(20);
    d1 DATE;
    d2 DATE;
    BEGIN
         d1 := :GLOBAL.DIA_INI;
         d2 := :GLOBAL.DIA_FIN;
         repid := find_report_object('rep_lab02');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'p_fec_uno='||to_char((add_months(last_day(d1),-1) +1),'DD/MM/YYYY')||' '||
         'p_fec_dos='||to_char(d2,'DD/MM/YYYY'));
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := report_object_status(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' then
              WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
         ELSE
              ventana('E','error reporte no encontrado','S');
         END IF;
    END;
    END;
    The 'rep_lab02' is the name of the report that you give in the node reports
    p_fec_uno and p_fec_dos they are the parameters in the report
    repserver is the name of server created with rwserver
    Greetings

  • How to run workflow from Developer studio ?

    Hi Guys,
    I searched for a work item type in the developer studio and it showed the results, but could not find out how to run it from there.. I know we can run it from there.. There is no run button or options available.
    Do i need to setup some profile options ?
    Any help in this is highly appreciated !!
    Thanks,
    Sathish

    Hi,
    Are you logged in as the Workflow Administrator or a user who has been assigned that responsibility?
    Have a look on the Administration tab and it will show you who is configured as the admin.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://www.workflowfaq.com/blog ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to Run scenario from the web using HTTP web page?

    Hi guys
    Please let me know How to Run scenario from the web using HTTP web page?
    Regards
    Janakiram

    Hi Janakiram,
    ODI provides web based UI for running the scenarios using Metadata Navigator (read only of ur ODI components) and Lighweight designer (u can edit the mapping here).
    Please explore how to install metadata navigator in ODI and have a look at ODI Setup document for more information.
    Thanks,
    Guru

  • How to run import from Unix Oracle 8.0.5 database with Windows Oracle client?

    How to run import from Unix Oracle 8.0.5 database via network with Windows Oracle client? Is it possible? When I try to do it Oracle client just hangs... If not which ones are compatible Aix or Solaris to Unix or it must be a Unix client to connect to Unix Oracle database. Thank's for any help.

    Hi,
    In our project we are using this type. Since in this project server in UNIX(DEC) and client is running on windows. We have created a listener which always listen requests from client and doing the according to the request.
    Step1. create a request table, where u are inserting ur request.
    step2. create PRO*C proram, which is listening request on the table. If there is any request, call the imp (executable). This is happening on server side.
    Benifit. U can make a request from cleint and ftp the file client sit.
    Are u interested in more details and code, pls send a mail to me
    ---- Boby Jose Thekkanath
    [email protected]
    Dharma Computers(p) Ltd. Bangalore.
    null

  • How to initiate process from Java?

    Hello,
    Does anyone knows how to initiate Process from java code???
    or Which API can start a new instance of Business process??

    If you are on Oracle BPM 10g, here's a link to a thread on this forum that might also help. It is a step-by-step.
    Creating a new work item instance in a process using PAPI
    Dan

  • How to run perl file from java file..???

    Hi All,
    How to run a perl file from java file.I know that there is one JPL(Java-Perl Library) preprocessor which can be used to do this,but no idea of how to do it..
    Any help is appreciated.
    Thanks in advance.

    viswa07 wrote:
    Ok and any idea regarding JPL..????I don't know it and the first few posts that I found mentioned it using Java 1.1-style JNI calls, which hints at a dead project. And you don't want to use a dead project.

  • How to pass session from Java to Perl

    Hi,
    I need to pass a session value from Java to Perl, does anyone knows how can I do it?
    Thanks

    If you want to run java code from Perl, and have it return a single value, that's one thing: but having Perl interact with java code - calling methods, returning values - that may not be possible.
    Look into python to see if it may be what you're looking for. It's a scripting language that allows real interaction with java.
    If all you want to do is run java code and have it return some data, that would be trivial, so I assume that's not what you mean. But in case it is heres an idea:
    Set up a network connection between them with your own protocol, seeing as both languages are good at networking.

  • How to send parameters from java to perl

    I have a java program which is executing a perl script. I m using
    Runtime.getRuntime().exec method to execute the perl script. Now I have to send some parameters to the perl script from java which will be processed there. can you help me how to do it?

    nitu007 wrote:
    Then there is no solution for this .Not true.
    Actually the perl script was preety big and to convert it to java it will take time.That's no excuse not to do it.
    So i thought i could execute it througn java.You can. CGI is basically a protocol on how to invoke programs and deal with their output; so other programs than web servers can follow it to invoke CGI scripts.
    However, (1) you may find that implementing the CGI protocol from the invoker's side may be a bigger pain than it's worth, and (2) in the long run, you'll end up with a hack that will be a pain to maintain.
    In your case, because the script uses CGI.pm, implementing the full CGI protocol probably won't be necessary. But you'll still be doing some klugery to run the CGI script at all, and you'll be buying yourself pain in the long run. Even if you do run it this way, I'd advise that once you have that working and have some breathing room, you start to work porting the script.

  • How to run tools from a java archive

    I used to run Multivalent from http://multivalent.sourceforge.net/ but am now getting error messages like this:
    Exception in thread "main" java.lang.NoClassDefFoundError: tools/pdf/Impose
    This happens even when I'm in the directory containing the jar file.
    I've never installed it by myself though so am not sure that I've done it right. I put the jar file into ~/library/java but that was a guess after reading lots of web pages that don't quite say what to do. They assume that I've read some intro material that I haven't been able to find.
    Any pointers on where I can find out how to do this right?
    In case it's relevant, java -version returns:
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
    Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
    and echo $CLASSPATH returns a blank line.

    wyvern-eater wrote:
    I used to run Multivalent from http://multivalent.sourceforge.net/ but am now getting error messages like this:
    Exception in thread "main" java.lang.NoClassDefFoundError: tools/pdf/Impose
    This happens even when I'm in the directory containing the jar file.
    I've never installed it by myself though so am not sure that I've done it right. I put the jar file into ~/library/java but that was a guess after reading lots of web pages that don't quite say what to do. They assume that I've read some intro material that I haven't been able to find.
    Any pointers on where I can find out how to do this right?
    In case it's relevant, java -version returns:
    java version "1.5.0_16"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
    Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)
    and echo $CLASSPATH returns a blank line.
    You would do better reposting in our Unix forum here:
    http://discussions.apple.com/forum.jspa?forumID=735

Maybe you are looking for

  • How to create the INBOUND Function Module for INBOUND IDOCs

    Hi Friends, Can any Suggest me How to proceed to Create an INBOUND Function Module for Processing the INBOUND IDOCS which are recieved from XI Server ? I am working in SAP-ISU Here i will recieve the INBOUND IDOCs for the Meter Reading Orders. We hav

  • Applet security problems while connecting with database

    i hav problem in the japplet connecting with sql database it gives security access denied error while running program as my driver is jdbc:odbc:bridge driver so for resolving this error how can i turn off security of applet and also which security pe

  • Windows Server 2012 Logical Disk Free Space (%) Low

    I enabled the monitor "Windows Server 2012 Logical Disk Free Space (%) Low" and configured a low threshold to test. I started to get a bunch of warnings from servers, for example: The disk \\?\Volume{ee0222ed-16de-40a5-af89-f95db3fdf5a4} on computer

  • SSL and URLs

    If i am using SSL to keep data secure in transmission is the URL encrypted because other wise wouldn't a hacker beable to get the session id from the URL and spoof as the client. Thanks for any help

  • New internal order type--need help

    Dear all: i have a case need help. now i want to create a new internal order type ,and assign a new number range and a default settlement rule to it . the settlement rule is that the actual costs of this  internal order type need to be sent to a cost