How to call functions in windows or Solaris in servlet?

Hello,
Does anyone know if there is a way for servlets to call functions in windows or solaris shell command????
Thanks :)

Checkout the Runtime.exec family of methods.
I would think carefully if calling a shell script or batch file from a J2EE web component is something you really want to do though.

Similar Messages

  • How to call function in jar file?

    First, I can't write english well.(I'm korean.. ) sorry about that.
    I have known function in jar file.
    but I don't know how to call function in jar file.
    how can I this work?
    My project and another project are respectively developing D-project with me and other man.
    so i need it. or I can't do this work.
    I will paste other's source code in my source code.
    and then recomplie , build it.. but it is not my wish!
    thanks for reading my sentence.

    If you have a jar file with a class that you wish to use, then you must add the jar file to your class path ($CLASSPATH on unix, linux, etc. and %CLASSPATH% on Windows).
    Then you can use the class normally, just as you would if it were not in the jar.
    If you meant something else, you'll need to explain what you meant.

  • HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM

    PLEASE ANYONE TELL ME, ABOUT  HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1

    Hi,
      Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM. 
    If helpful, reward points.
    Rgds,
    CK

  • Smartforms - how to call 2nd secondary window page

    Hi
    How to call 2nd secondary window page from Ist Main window. The scenario is i have one main page. I have already called 2nd page thru command line and now want to call another page (i mean third page) from same main window. How do I do?
    Thanx and regards,
    Rajesh Vasudeva

    Hi Rajesh,
    Go for the below link>>>>>
    [http://help.sap.com/search/highlightContent.jsp]
    thnks.

  • How to call operating system(windows) functions like sutdown,refresh,et

    Hello,
    I am new in Oracle D2k.I want to know that how to call windows XP/7 shell commands(operating system functions) or windows function key(like F5 for system refresh in windows xp/7) in an Oracle Form.
    Actually I have to make a trigger which can fire at pressing a particular key and execute appropriate action of Windows7 like shutdown,F5(function key of windows to system refresh).
    thank you
    regards
    aaditya.

    Just for future reference, regardless if you are posting in the Forms area of the forum or any other, terms like Forms 11g, Oracle 11g, etc are parts of product names. They are not version numbers although they do offer a slight hint. It is very important that when posting you include the complete version number of any products related to the problem or question you have. For example, you said you are using Oracle Forms 11g. Look at how many possible versions "Forms 11g" could possibly be:
    11.1.1.1
    11.1.1.2
    11.1.1.3
    11.1.1.4
    11.1.1.6
    11.1.2.0
    11.1.2.1
    With each new patch release and major release, a large number of bug fixes are included. In the case of new major releases, in addition to bug fixes, many new features are added. So knowing the version number is important.
    Beyond that, it would appear that you have many questions:
    1. How to copy and paste
    2. How to execute a system shutdown
    3. How to force the browser into full screen mode
    4. Refresh - this one is unclear. What do you mean by "refresh"?
    Let me answer those that I can:
    <blockquote>o Functions like cut/copy/paste are available directly from your Forms code. For these I would recommend referring to the Builder's Online Help. Look for CUT_REGION, COPY_REGION, PASTE_REGION. It might also be helpful to understand SELECT_ALL. For example you may want to code a Copy button like this:
    GO_ITEM('some_text_field);
    SELECT_ALL;
    COPY_REGION;o To execute a system shutdown on the client machine, you would first need to WebUtil enable your form. Refer to the Forms Builder Online Help for information about how to use WebUtil. You can also find lots of information in this forum about WebUtil. Once enabled, you can execute a Windows shutdown in various ways. Here one option:
    Declare
         my_cmd varchar2(255);
    Begin
         my_cmd := 'cmd /c start "" "' || '"shutdown -s -f -t 1"' || '"';
         WEBUTIL_HOST.HOST (my_cmd);
    End;Refer to the Microsoft documentation for more information: http://technet.microsoft.com/en-us/library/bb491003.aspx
    o I'm not sure what you are attempting to do with the F11. I understand that this function key sets the browser to full screen, but the form will not exactly adjust for this change in browser size. You can adjust the applet size dynamically, but not the form. For that you would need to code the behavior yourself. So, before I can offer something specific, it would be helpful to understand what you expectation is and if what you want is to set the browser to full screen, why not just allow the end user to do it? You could easily have a java script popup displayed before the form starts which might say something like "To maximize your browser, press F11"
    o Finally, "refresh". I don't know what you mean here. Refresh what? The Windows desktop, browser, Oracle Forms.....
    </blockquote>

  • How to call Function Module in Selection Screen

    Hi All,
    I have developed one HR Report (Qualification Overview Report: To display all active employees and their Qualifications along with their Proficiency).
    Already it has 3 selection fields on selection screen and now I want one more field on selection screen like Qualification Id.
    But when the end user press F4 it should display the Popup which comes in TCode: PA30 at the time of Creating Qualification.
    I have debugged the Standard Code and searched the Function Module: 'RH_OBJID_REQUEST' which shows Popup which I wanted to show at Selection screen for newly added field.
    So I have to define new field like 'Qualification Id' and want to attach above Function Module so that it will cater my requirement.
    If anybody has worked on this type of requirement then please let me know.
    Thanks,
    Jay.

    Hi Raymond,
    I have written following code:
    s_quali is used in selection screen for Qualification Id.
    SELECT-OPTIONS :  s_quali   FOR hrp1000-objid NO INTERVALS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_quali-low.
      CALL FUNCTION 'RH_OBJID_REQUEST'
        EXPORTING
          plvar           = '01'
          otype           = 'Q'
          seark           = '*'
          seark_begda     = '18000101'
          seark_endda     = '99991231'
          set_mode        = 'X'
        TABLES
          sel_objects     = git_objects.
      LOOP AT git_objects INTO wa_objects.         " Logic is to fill up the Selection screen field
        s_quali-low = wa_objects-objid.
        APPEND s_quali TO s_quali.
        CLEAR : s_quali, wa_objects.
      ENDLOOP.
    Now problem is that, its not populating all values in selection screen which I select from Popup screen (Choose Qualification).
    I checked that the first value in the internal Table is over written by second records in the internal table
    For e.g.: If I select 001,002,003,004 from Popup screen then I am able to see only 002,003,004 in the Multiple selection view of that field though it is available in the internal table s_quali (because I am filling up the table using Loop-Endloop)
    Please advise me how to overcome this issue. (How to fill up selection screen)
    Thanks,
    Jay.

  • HANA Server site JavaScript how to call functions in another .js file? thanks

    In HANA Studio, I have created a .js file and a server site javaScript .xsjs file. The .js file and .xsjs file are in the same path .I create function F1() in js file. Then I want to call function F1 in xsjs file. But it always through an error “f1 was used before it was defined”. Any suggestion? Thanks very much
    .js file:
    .xsjs file:

    Hi Jim,
    Now I have found the method how to use external library. If we want to outsource some of xsjs functions to an external library, XSEngine provides a special format for this, called “.xsjslib”. Then in xsjslib file, we define functions need to be outsourced.
    In .xsjs file, we can import a library using the following code:
    $.import("<Package_Library_was_deployed>","xsjslib File Name");
    The Package_Library_was_deployed please refer to:
    Access functions inside library by this path:
    $.Package_Library_was_deployed.xsjsFileName.FunctionName();

  • How to call functions defined and packed in a .dll file

    hi,
    my client have provided me with a .dll file which implements all functions tasks.
    earlier we created a applications in vb that accessed functions from the .dll file provided by client.
    now he wants java implementation of the same application written in vb.
    now how to access functions in .dll file provided by the client from java source code.
    regards,
    s.mohamed asif

    For this you should write JNI wrappers for the native functions, that is you create class with the native function prototypes as native methods, implement these methods with native functions in JNI module, each JNI function calls a native function from your DLL.
    I know that JNI coding is a greate pain. That is why I am developing Java Platform Invoke which is a paradigm of .NET Platform Invoke. See my demo at
    http://www.sharewareplaza.com/Java-Platform-Invoke-API-Demo-version-download_49212.html

  • How to call function module/ class method of another system.

    Suppose now i am working in System A. And i need to check the system Status of System B, System C, System D....
    my design is to provide an interface. and each system realize the interface individually.now my question is how cani call the interface, because they are in different systems.
    of course i know about the host name, port and logon information over these systems.
    who can give my some suggestions or other solutions.
    thanks in advance.
    Johnney.

    Hello,
    If u want to call a FM of the other system then that FM should be a RFC enable on one.
    <b>CALL FUNCTION func DESTINATION dest.</b>
    Effect
    Executes the function module from an external source (as a Remote Function Call or RFC); dest can be a literal or a variable.
    Depending on the specified destination, the function module is executed in another R/3 or R/2 System. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
    Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
    To maintain existing destinations, choose Tools -> Administration, Administration -> Network -> RFC destinations
    Note
    Under certain circumstances, an RFC may trigger a database commit. For this reason, RFCs must not be used between pairs of SQL statements that open and close a database cursor (such as SELECT... ENDSELECT).
    Vasanth

  • How to call function module from IP

    Hi
    I need to trigger the process chain from the input ready queries in Bex analyzer. I figured out that I need to call RSPC_API_CHAIN_START.
    How do we go about in calling the above function module in IP.
    Thanks in advance
    I

    Hi Matt
    Thanks for your response, it was very productive at the right time as we saw our process chain running indefinetly. With selecting all chars to be changed, it ran just once with no errors.
    what is TA ? I know rsplan- transaction code for the planning modeler.
    Can you tell me how can we call function module in custom exit planning function.
    Where should I embed the code
    CALL FUNCTION 'RSPC_API_CHAIN_START'
                   EXPORTING
                     I_CHAIN             = 'ZPC_CCATOPCA'.
                   I_T_VARIABLES       =
                   I_SYNCHRONOUS       =
                   I_SIMULATE          =
                   I_NOPLAN            =
                 IMPORTING
                   E_LOGID             =
                 EXCEPTIONS
                   FAILED              = 1
                   OTHERS              = 2
    thanks in advance

  • How to restart services in windows and solaris environment?

    I need to start services running in windows and solaris platforms with java code. I have a fair idea how to do in C++ . So wondering if same can be done with java. .. Please help me out!
    Thanx

    you may also like to look at the wrapper project on source forge. It lets you set up services under any O/S with full control of the JVM that is running.
    Btw my previous answer only helps you under MS, didn't notice that you wished to know how to do it under unix. If its a non-java service, you will need to determine what platform your on and then perform the appropriate action.

  • How to call function which return and out

    My function specifcation is
    FUNCTION GetGoogleScholarActivation (
    pi_clnt_id IN google_scholar_status.clnt_id%TYPE,
    pi_status_type IN ci_status_type_tab_type,
    po_status OUT ci_status_tab_type,
    po_date OUT ci_date_tab_type
    RETURN NUMBER ;
    where type is
    TYPE ci_status_type_tab_type IS TABLE OF VARCHAR2 (1) INDEX BY BINARY_INTEGER;
    TYPE ci_status_tab_type IS TABLE OF VARCHAR2 (10) INDEX BY BINARY_INTEGER;
    TYPE ci_date_tab_type IS TABLE OF VARCHAR2 (8) INDEX BY BINARY_INTEGER;
    I am trying to call function in SQL PLUS for testing as
    declare
    var number ( 10);
    TYPE p_st1 IS TABLE OF VARCHAR2 (1) INDEX BY BINARY_INTEGER;
    p_st p_st1 ;
    type p_status1 IS TABLE OF VARCHAR2 (1) INDEX BY BINARY_INTEGER;
    p_status p_status1 ;
    TYPE p_date1 IS TABLE OF VARCHAR2 (8) INDEX BY BINARY_INTEGER;
    p_date p_date1 ;
    Begin
    p_st(0) := 'A';
    var := PQDKGOSH.GetGoogleScholarActivation(11920 , p_st, p_status ,p_date );
    dbms_output.put_line ('Activation_status '|| p_status(0) );
    dbms_output.put_line ('Activation_date '|| p_date(0) );
    dbms_output.put_line ('Retun Value'|| var );
    End;
    but getting error PLS-00306: wrong number or types of arguments in call to
    'GETGOOGLESCHOLARACTIVATION'
    so how to test from SQL Plus

    HI
    I tried to execute below like this
    declare
    var number ( 10);
    p_st ci_status_type_tab_type ;
    p_status ci_status_tab_type;
    p_date ci_date_tab_type;
    Begin
    p_st(0) := 'A';
    var := PQDKGOSH.GetGoogleScholarActivation(11920 , p_st, p_status ,p_date );
    dbms_output.put_line ('Activation_status '|| p_status(0) );
    dbms_output.put_line ('Activation_date '|| p_date(0) );
    dbms_output.put_line ('Retun Value'|| var );
    End;
    still iget error
    PLS-00201: identifier 'CI_STATUS_TYPE_TAB_TYPE' must be declared
    becuse this declareation i did in package specification .
    and i am trying to execute the function .

  • How to call function in FOX

    In fox , can I use call function which developed by ABAP?
    I want to use the call function to read table in FOX.
    thanks

    hi
    u can use functions, but not complex.
    the syntax is as follows
    CALL FUNCTION UPC_FUNCEXEC_SAVE
    EXPORTING
    I_NO_TRANSACTION_DATA = FLAG
    tx
    srin

  • HOW TO CALL FUNCTION MODULE FROM ABAP4 EDITOR

    HI !
    friends
    I want to call function module from abap 4 editor.
    is there any shortcut key from edit menu through which if give a function module name then  it calls the function automatically?
    points will be awarded.
    Cheers
    troy

    command will be like this
    <b> call function 'YW2_GET_MNW_PERIOD'
            exporting
              w_budat       = v_datum
            importing
              w_period      = i_date-period
              w_period_desc = i_date-p_desc.</b>
    Regards
    prabhu

  • How to call function BAPI_GOODSMVT_CREATE ?

    Hi all,
    I want to create a material document by calling the function BAPI_GOODSMVT_CREATE
    I don't know what to pass although I know I have to export something (GOODSMVT_HEADER and GOODSMVT_CODE) in my ABAP. But what should I actually pass to the function?
    Thanks.

    Hi,
    Try with this
    data : gt_header like bapi2017_gm_head_01 ,
           gt_code like bapi2017_gm_code,
           gt_item like bapi2017_gm_item_create occurs 0,  
           gt_sno like bapi2017_gm_serialnumber occurs 0.
      gt_code-gm_code ='03'.  "goods issue
    In the header pass the posting date, header text etc...
    and in the line item populate material, plant, storage location, movement type.....
    IF necessary pass the serial number in the gt_sno table 
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header       = gt_header
          goodsmvt_code         = gt_code
        tables
          goodsmvt_item         = gt_item
          goodsmvt_serialnumber = gt_sno
          return                = gt_return.
    Cheers
    Sasi

Maybe you are looking for