How to call java program by HTML page

Hi guys,
I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
If you have small sample,pls send to me. [email protected], thanks in advance
Jian

This code goes with the tutorial from this web page
http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
good luck.
* This is a demonstration JDBC applet.
* It displays some simple standard output from the Coffee database.
import java.applet.Applet;
import java.awt.Graphics;
import java.util.Vector;
import java.sql.*;
public class OutputApplet extends Applet implements Runnable {
private Thread worker;
private Vector queryResults;
private String message = "Initializing";
public synchronized void start() {
     // Every time "start" is called we create a worker thread to
     // re-evaluate the database query.
     if (worker == null) {     
     message = "Connecting to database";
worker = new Thread(this);
     worker.start();
* The "run" method is called from the worker thread. Notice that
* because this method is doing potentially slow databases accesses
* we avoid making it a synchronized method.
public void run() {
     String url = "jdbc:mySubprotocol:myDataSource";
     String query = "select COF_NAME, PRICE from COFFEES";
     try {
     Class.forName("myDriver.ClassName");
     } catch(Exception ex) {
     setError("Can't find Database driver class: " + ex);
     return;
     try {
     Vector results = new Vector();
     Connection con = DriverManager.getConnection(url,
                              "myLogin", "myPassword");
     Statement stmt = con.createStatement();
     ResultSet rs = stmt.executeQuery(query);
     while (rs.next()) {
          String s = rs.getString("COF_NAME");
          float f = rs.getFloat("PRICE");
          String text = s + " " + f;
          results.addElement(text);
     stmt.close();
     con.close();
     setResults(results);
     } catch(SQLException ex) {
     setError("SQLException: " + ex);
* The "paint" method is called by AWT when it wants us to
* display our current state on the screen.
public synchronized void paint(Graphics g) {
     // If there are no results available, display the current message.
     if (queryResults == null) {
     g.drawString(message, 5, 50);
     return;
     // Display the results.
     g.drawString("Prices of coffee per pound: ", 5, 10);
     int y = 30;
     java.util.Enumeration enum = queryResults.elements();
     while (enum.hasMoreElements()) {
     String text = (String)enum.nextElement();
     g.drawString(text, 5, y);
     y = y + 15;
* This private method is used to record an error message for
* later display.
private synchronized void setError(String mess) {
     queryResults = null;     
     message = mess;     
     worker = null;
     // And ask AWT to repaint this applet.
     repaint();
* This private method is used to record the results of a query, for
* later display.
private synchronized void setResults(Vector results) {
     queryResults = results;
     worker = null;
     // And ask AWT to repaint this applet.
     repaint();

Similar Messages

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • Problems calling Java Servlets from HTML pages Online

    Hello
    I have created a Web site using Java Servlets, and have acquired some servlet enabled web-space however i am having some difficulty in calling the actual servlets from the HTML pages i was using the line of code as follows
    http://localhost:8080/servlet/....
    followed by the name eg.
    http://localhost:8080/servlet/Login
    however this doesn't seem to be working i have also tried using the exact address of the servlet but this didn't work either
    i.e ..servlet/Login.java
    I was wondering would anyone have any idea as in how the servlets should be called
    Thanks very much

    Once you write the Servlet code, you have to compile and put the classes in the server classpath. To refer these servlets from your pages, you have to configure them in the server configuration(typical a xml file). There you define how you are going to refer to the servlet(/servlet/Logon) and the correponding class.
    -Mak

  • How to call java program from javascript

    Hi,
    I have an java program which will transform one xml to another xml using XSLT.
    I want to call this java program from Javascript? Is this possible? Please suggest me.
    Thanks,
    Gopal

    is it not possible?
    do i have to refresh the page and read in the values like...
    <%
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • How to call JAVA program having input & output parameter

    Hi Experts,
    Require ur help in calling a java program in ODI which has input parameter & I need to also get the output of the java program.
    I have a java program which I execute through command prompt with input parameters required for the program.
    Also I need to get the output of the same java program & need to pass it as input to another Java program.
    kindly help...how to implement the java program in ODI as I have not worked on Java.

    Hi experts,
    kindly help...

  • How to show java program on html

    i have gotten some program fm a website. the program was in java form which is save as .class. can i know how do i display my result in the html??
    thanks alot!!

    you may write a applet,for example:
    import java.awt.*;
    import java.applet.*;
    public class Testexample extends Applet {
         public void init() {
         public void paint(Graphics g) {
              g.drawString("Welcome to Java!!", 50, 60 );
    compile this java.and then write a html in the same path with Testexample.class:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY BGCOLOR="000000">
    <CENTER>
    <APPLET
         code     = "Testexample.class"
         width     = "500"
         height     = "300"
         >
    </APPLET>
    </CENTER>
    </BODY>
    </HTML>
    now you may show this java program from html

  • Getting error when calling Java program from JSP page.

    Hi All,
    I'm getting below error msg, previously the page use to display and also java program use to run properly, but suddenly today i came across this error. May be some settings have been changed on my server, since number of developers uses this common webserver here.
    Any help would be much appreciated. Pls let me know if if anyone requires much info regarding this one.
    javax.servlet.ServletException: sun/tools/javac/Main
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.(Compiled Code)
         at java.lang.Exception.(Compiled Code)
         at javax.servlet.ServletException.(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
         at org.apache.tomcat.core.Handler.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward
    Root cause:
    java.lang.NoClassDefFoundError: sun/tools/javac/Main
         at org.apache.jasper.compiler.SunJavaCompiler.compile(Compiled Code)
         at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
    Message was edited by:
    shukla_arvind

    did u happen to upgrade ur jdk?????

  • How to call java program through ODI

    Hi,
    I have written java program which i want to run though ODI.My questions are as follows:
    1. At which place i need to put my code and jar files i.e. do i need to put my code on the machine where ODI is installed?
    2. which technology to use i.e. jython or java bean shell.
    3. Commands format for jython or java bean shell.
    Is there any book or forum to which i could refer to get a deeper knowledge about these as i am new to ODI.
    Thanks
    Abhi

    881195 wrote:
    Hi,
    I have written java program which i want to run though ODI.My questions are as follows:
    1. At which place i need to put my code and jar files i.e. do i need to put my code on the machine where ODI is installed?You need to place the JAR file at ODI's driver folder.
    2. which technology to use i.e. jython or java bean shell.You can use Jython or Java bean shell . I prefer Jython .
    3. Commands format for jython or java bean shell.In your procedure , set the technology to Jython .
    Write normal java commands ... like
    import <your_class_name>
    <you operation etc>
    >
    Is there any book or forum to which i could refer to get a deeper knowledge about these as i am new to ODI.
    Thanks
    Sutirtha

  • How to use java programe in oracle form

    Hello Expert,
    My Config is : -
    Forms [32 Bit] Version 11.1.1.3.0 (Production)
    Jdeveloper - 10.1.3
    I want to use the java programe in form builder. I create the one java class in Jdeveloper -
    package demo;
    import java.net.InetAddress;
    import java.net.NetworkInterface;
    import java.net.SocketException;
    import java.net.UnknownHostException;
    public class get_info{
       public static void main(String[] args){
       ch_add();
       public static void ch_add()
      InetAddress ip;
      try { 
      ip = InetAddress.getLocalHost();
      /*System.out.println("Current IP address : " + ip.getHostAddress());  */
      NetworkInterface network = NetworkInterface.getByInetAddress(ip);
      byte[] mac = network.getHardwareAddress();
      /*System.out.print("Current MAC address : ");   */
      StringBuilder sb = new StringBuilder();            
      for (int i = 0; i < mac.length; i++)
      sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? "-" : ""));
      System.out.println(sb.toString()); 
      } catch (UnknownHostException e) {
      e.printStackTrace();
      } catch (SocketException e){
      e.printStackTrace();
    and this into Formweb.cfg and default.env and also add into Form_class_path. After that i import this java into forms.
    Code genertated -
    PACKAGE BODY get_info IS
      -- DO NOT EDIT THIS FILE - it is machine generated!
      args   JNI.ARGLIST;
      -- Constructor for signature ()V
      FUNCTION new RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
      END;
      -- Method: main ([Ljava/lang/String;)V
      PROCEDURE main(
        a0    ORA_JAVA.JARRAY) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: ch_add ()V
      PROCEDURE ch_add IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
      END;
    BEGIN
      NULL;
    END;
    Now i want to call the o/p of Java programe in oracle text item. Please help me. It's very urgent. I am not good in Java.

    Sir i use java importer.
    PACKAGE BODY get_info IS
      -- DO NOT EDIT THIS FILE - it is machine generated!
      args   JNI.ARGLIST;
      -- Constructor for signature ()V
      FUNCTION new RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN (JNI.NEW_OBJECT('demo/get_info', '()V', args));
      END;
      -- Method: main ([Ljava/lang/String;)V
      PROCEDURE main(
        a0    ORA_JAVA.JARRAY) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: ch_add ()V
      PROCEDURE ch_add IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(TRUE, NULL, 'demo/get_info', 'ch_add', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(J)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '()V', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'wait', '(JI)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'demo/get_info', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'demo/get_info', 'toString', '()Ljava/lang/String;', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'demo/get_info', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'demo/get_info', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'demo/get_info', 'notifyAll', '()V', args);
      END;
    BEGIN
      NULL;
    END;
    I read both document which is given by you.
    Basicaly i don't know how to call java program in form builder.
    I wrote this code on When-button-pressed
    DECLARE
    jo ora_java.jobject;
    rv varchar2(1500);
    ex ora_java.jobject;
    BEGIN
    jo := get_info.new;
    rv:=get_info.ch_add(jo );
    EXCEPTION
    WHEN ORA_JAVA.JAVA_ERROR then
      message (' Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR );
      message('');
    WHEN ORA_JAVA.EXCEPTION_THROWN then
      ex := ORA_JAVA.LAST_EXCEPTION;
      message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
      message(' Unable to call out to Java ' ||Exception_.toString (ex ) );
    END;
    No error comes and no output comes. I want the client MAC ID. please guide me where i need to change the code.

  • How i can call java program in VB2005 ?

    Hi members...
    Please...please...please...
    If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
    thanks ...

    If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
    An example for an application like this:
    import java.io.IOException;
    public class StartApp
    public static void main(String[] args)
    if (args.length > 0)
    StringBuffer cmd = new StringBuffer();
    for (int index = 0; index < args.length; index++)
    cmd.append(args[index] + " ");
    try
    Runtime.getRuntime().exec(cmd.toString());
    catch (IOException ioe)
    System.out.println("Error: command not found: " + cmd.toString());
    else
    System.out.println("Error: missing arguments");
    An example for starting your server with that programm:
    /usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
    It works. Have fun.

  • How to call java method on page load?

    How to call java method on page load?
    Thanks

    Hey Dan,
    Well, if you want to execute a java method when page is load, you need to put the clientlistener in af:document. Let me to show you an example (I can't find my post :P),
    JSPX page:
    <f:view>
    <af:document>
    <f:verbatim>
    <script>
        function loadPage(event) {
            alert('Hello World!');
    </script>
    </f:verbatim>
    <af:clientListener method="loadPage" type="load"/>
    </af:document>
    </f:view>If you try this code you can see that when the page has been load, you recieve the alert "Hello World!".
    Furthermore, this is the javascript AJAX function that let you to call a servlet:
    function ajaxFunction () {
        var httpRequest;
        if (window.XMLHttpRequest) {
            httpRequest = new XMLHttpRequest();
        } else if (window.ActiveXObject) {
            httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
            httpRequest.overrideMimeType('text/xml');
        httpRequest.onreadystatechange = function() { alertContents(httpRequest); };
        httpRequest.open('GET', '/appname/servletname', false);
        httpRequest.send('');
    function alertContents(httpRequest) {
        if (httpRequest.readyState == 4) {
            if (!httpRequest.status == 200) {
                alert('Request error. Http code: ' + httpRequest.status);
    }Where 'appname' is your application name and 'servletname' is the name of the servlet that you want to call. Obviously, you can call any URL ;)
    JVN

  • How to call BPEL process in JSP page

    Hi
    I am new to BPEL.please help me how to call BPEL process in JSP page.
    Thank You...

    Check this thread ....
    How can i call asyncronous BPEL process from Java Class????
    Tom..

  • How to Call Java from ABAP

    Hi all,
    I have installed JCO & created the RFC in SAP. i have used below code to test my RFC connection & it's working fine.
    But In the below report, where to call the JAVA Program & what code i should use to call java code .
    Actually my ABAP requirement is to download a file. Then i need to call JAVA program, inside ABAP, to encrypt the downloaded file. Here, Java program is used to encrypt the file. Now question is, how to call the Java program inside the ABAP code.  Please advice with the code sample. Thanks a lot.
    REPORT  z_jco_test.
    PARAMETERS: requtext LIKE sy-lisel.
    DATA: echotext LIKE sy-lisel,
          resptext LIKE sy-lisel,
          rfctest TYPE TABLE OF rfctest,
          wa_rfctest TYPE rfctest.
    wa_rfctest-rfcdata1 = requtext.
    wa_rfctest-rfcdata2 = 'Hello World'.
    APPEND wa_rfctest TO rfctest.
    CALL FUNCTION 'RFC_PING'
      DESTINATION 'JCO'.
    CALL FUNCTION 'STFC_CONNECTION'
      DESTINATION 'JCO'
      EXPORTING
        requtext = requtext
      IMPORTING
        echotext = echotext
        resptext = resptext
      TABLES
        rfctest  = rfctest.
    WRITE: 'Echo Text: ', echotext.
    WRITE: 'Response Text: ', resptext.
    LOOP AT rfctest INTO wa_rfctest.
      WRITE: / 'rfcdata1: ', wa_rfctest-rfcdata1.
      WRITE: / 'rfcdata2: ', wa_rfctest-rfcdata2.
    ENDLOOP.

    Hi,
    You might accomplish your goal using external operating system commands.
    1) Define in SM69 an external command, letu2019s say ZJAVA. This command will execute a script on the operating system, letu2019s call it calljava.sh.
    2) In script calljava.sh you just call java, passing some parameters. For example, java $1 $2 $3 $4 $5 $6 $7
    3) In your ABAP program you call the ZJAVA external command and pass parameters to it. Of course, one of the parameters must be your Java program name.
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
        EXPORTING
          commandname                   = l_command
          additional_parameters         = l_param
          trace                         = 'X'
        IMPORTING
          status                        = l_status
          exitcode                      = l_exitcode
        TABLES
          exec_protocol                 = l_exec_protocol_itab
        EXCEPTIONS
          no_permission                 = 1u2026

  • How to call java function from PL/sql in oracle applications

    I am trying to call a java function from plsql procedure. Can any one explain how to call java function, and in which directory I have to store my java function in oracle applications. Do I need to register that java function from Application developer.
    Thanks
    Kranthi

    http://www.oracle.com/technology/tech/java/jsp/index.html
    Good Luck,
    Avi.

  • How to call java script function from JSP ?

    how to call java script function from JSP ?

    i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks

Maybe you are looking for

  • How to use pl/sql code as ODI user defined function

    Hi All, i have a pl/sql code and i want to create ODI user defined function using this code . please find the pl/sql code below: ============================ declare v_no_of_duplicate_rec number := 0; begin select count(*) into v_no_of_duplicate_rec

  • Ambiguous Hierarchy for drill in IDT

    Hi, I have created a two Hierarchies in Navigational path in IDT. Both hierarchies use the same dimensions Org Unit: Level1,Level2,Level3,Level4,Level5,Level6,Emp Full Name (ii) Org Structure: Level1,Level2,Level3,Level4 The (2) Hierarchies are used

  • What's with the Blue&Green Text (sent as text message

    Hi well i just want to know why sometimes my text appears in green and sometimes blue this is an example did she/he received the message? http://i.imgur.com/nsn4xSK.png?1 when i first sent the message was blue now i sent another text yesterday and it

  • Should DSL modem be left on all the time?

    For the last week, I have been having serious intermittant DSL connectivity problems. Nothing has changed in my house, we do not have wireless, no other comm devices, etc. I have opened a trouble ticket with Verizon.com because of static on the phone

  • Logic is acting strange,now...

    I reinstalled OSX 4.2 and I upgraded the memory, now Logic won't fully start and will not shut down. The motu firewire software is also not shuting down. I selected force quit and nothing happens. Am I going cookoo? What have I overlooked? After each