How to run Java codes from ABAP

Hi Gurus,
I have .JAVA & .CLASS files which connect to the website through HTTPS connection and generates the TEXT file at C:\ by obtaining some data from WEB Site. This java files needs SSL certificate Which has been imported in SAP. How can i run the Java files from SAP R/3, Please help me.
Thanks
Ganesh

hiii
refer to following link..
Java from ABAP?
Re: Calling Java API from ABAP using JCo
i hope it will solve your problem
regards
twinkal

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

  • How to invoke java application from ABAP

    How to invoke java application from ABAP  ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
    Thanks,
    Manish

    Hi Manish,
    did you get some further documents concerning "abap program calls ejb"?
    If yes, could you please send me some informations.
    Thank you for your help.
    Kind regards, Patrick.

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • How to launch Java WebDynpro From ABAP?

    I have a requirement to launch a Java WebDynpro from ABAP code. Has anyone done this? If so, does anyone know of documentation/sample code or at least an ABAP class/function group I could look at?
    Thanks in advance.

    The webdynpro application can be triggered simply by a URL, so this is really easy in ABAP.
    All you need to know is the URL for the WDJ application running on your java engine.
    report zrich_0001.
    data: url type string.
    url = 'http:\www.sap.com'.
    call method cl_gui_frontend_services=>execute
       EXPORTING
         DOCUMENT               = url.
    Regards,
    Rich Heilman

  • How to run GP process from ABAP Workflow

    Hi All,
    Can anybody tell me in detauls how can I run a GP process from ABAP workflow. What configuration are required for that in J2EE engine side as well as ABAP side.
    Thanks
    Chandan

    Hi Chandan,
    see <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/b1/259142d4d4b81ce10000000a1550b0/frameset.htm">here</a>, maybe this help.
    Ciao
    Luca

  • How to run java programs from a master java program?

    Hello,
    I have several java programs which run from the command prompt. I am seeking help with code for starting java programs from within a java program. For example, a program called master.java works something like this:
    import java.*;
    create connection pool
    create variables and result sets
    start/run slave1.java (var1, var2);
    start/run slave2.java (var3, var4, var5);
    start/run slave3.java (var1, var4);
    end of program master.java
    Each of the slave.java programs will run for up to an hour. I do not want the master.java program to pause for each slave program to stop. Instead, the master program will keep running and multiple slave programs will be running simultaneously with the master program. When a slave program starts, it is on its own. Also, if possible, I would like to have each of these slave.java programs open in a new separate command window, so I can observe each slave program running in separate windows.
    Any suggestions for code or helpful documentation are greatly appreciated.
    Thank you,
    Logan

    Thank you all.
    At the bottom of master.java I have successfully started a batch file with these lines:
    String jcmd = "cmd.exe /c start c:/data/simulations/MsgViewCount2.bat";
    Process proc = Runtime.getRuntime().exec(jcmd);
    But I still cannot get a java program to start. Here is one variation I have tried:
    String [] cmdArray = new String[2];
    cmdArray[0] = "java";
    cmdArray[1] = "slave1";
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec(cmdArray);
    This compiles, and no errors occur, but nothing happens.
    Regarding this comment:
    Why Runtime.exec? Either make the slaves Runnable or
    just call their main() methods.
    Oh, I see. Sepearate output. :PNone of the slave.java programs have any output.
    Thanks again.

  • Running java code from excel

    Hi,
    I have a large comprehensive program written in Java and I would like to incorporate the answer in Excel... is there any way I can call the Java program from Excel, execute it and record the answer on an excel spreadsheet?
    Thanks,
    mbrolass.

    You could write a macro in Excel to call your Java program. This was addressed in a former thread: http://forum.java.sun.com/thread.jspa?threadID=689170&start=0&tstart=0
    Excel VBA Accessing Java
    http://j-integra.intrinsyc.com/support/com/doc/#javafromcom/excelvba2java.html
    In order to run this, you'll need to download and install J-Integra for COM.
    http://j-integra.intrinsyc.com/downloads/

  • How to run java class from over the web

    hi i ftped my java files to an asp web site.
    if it were my local computer i would open up the c prompt and run it with the command java ....
    but is there a way for me to execute this java file in the same way
    stephen

    1. the code is a java application.
    How may I run this java application on the web server
    when I do not have access to the command prompt. I would discuss this with the administrator of the web server. You will need at a minimum a JRE installed on the server and permission to execute commands remotely. If the administrator decides to grant you that permission (which is not likely unless the two of you work for the same company), he should also be able to explain to you how to do that.

  • How to call java code from xslt.

    I have to do some complex looping in my stylesheets. It is difficult to implement it directly. can i write a javacode for the same and invoke it from my stylesheet? Can anyone help me out with a demo if possible?

    you're the one supposed to provide updates on your progress, not anyone else...

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • Compiling java code from a running java application

    How does compiling of java code from a running java application work?
    I found a class: com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class works.

    How does compiling of java code from a running java
    application work?Probably most reliably using Runtime.exec().
    I found a class:
    com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class
    works.For a purpose. You are not supposed to use this class. With the next JRE release or implementation, it might not exist anymore - it's not part of the standard API.

  • How to run java from another directory

    hi,
    i have a Sample.java file in F drive(f:/Sample.java). I opened command prompt in windows and went to c: drive and try to compile as
    C:\>javac f:/Sample.java
    above command works well. it generated Sample.class file in F:/Sample.
    But, when i try to Run that file, i got the error as follow.
    C:\>java f:/Sample
    Exception in thread "main" java.lang.NoClassDefFoundError: f:/Sample
    Caused by: java.lang.ClassNotFoundException: f:.Sample
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: f:/Sample. Program will exit.
    Please guide me to run java file from another directory

    Thanks a lot. I appreciate your answer
    But, when i try to run the java program.. below message has been displayed, showing how to use the command with options....
    I didn't get the result of java program.
    c:\>java f:\Sample.java
    C:\>java -cp f:\Sample
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    C:\>

  • How do I get the java code from a class file ?

    I want to know how to findout the java code from a .class file . Is there any utility or any way to get the java code from a .class file. If so , please let me know the step by step procedure .
    Thanks
    Shiva

    Check out Mocha (http://www.brouhaha.com/~eric/computers/mocha.html)
    It's free!

  • Java calls from ABAP code in XI

    Java and ABAP gurus,
    Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
    Please help.
    Thanks.

    Hi,
    YES, Very well it  is Possible,
    This will help you
    /people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
    /people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    JCo Outbound( calling Java Function from ABAP )
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Call Java Class and Methods from ABAP
    Regards
    Agasthuri Doss

Maybe you are looking for