Calling a java class from abap/bsp

Hello,
I am still learning ABAP. I need to call a java class (a chart drawing library) from ABAP or from a BSP. What is the best way to do that ?
Basically I would create an object, pass data from a database and then get some binary data from that object (an image).
Hope you can help me
Sincerely,
Olivier Matt

/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
check the above  link and this forum too
Call Java Class and Methods from ABAP

Similar Messages

  • Calling java class from abap function moduile

    Is it possible to call java class from function module.
    i am a java guy. my need is to call a java class from a  function module in the backend. which in turn performs certain functions.
    i would be highly obliged if someone could let me know if this is possible.
    regards
    Srikumar V

    Hi Srikumar ,
    you can call a java webservice in ABAP .
    u can call the webservice and via that u can trigger the java class..
    Regards
    Renu

  • How can I call a java class from within my program?

    I was wondering if there's a platform independent way to call a java class from my program.

    Here's my scenario. I'm working on a platform independent, feature rich, object-oriented command prompt program. The way I'm designing it is that users can drop classes they write into my bin directory and gain access to the class through my program. For example, they drop a class named Network.class in the bin directory. They would type Network network at my command prompt and gain access to all the methods available in that class. They can then type system.echo network.ipaddress() at my prompt and get the system's ip address. I have it designed that there's a server running in the background and the clients connect to my port. Once connected the end-user can enter their user name and password and gain access to the system. When they type a command they actually call another java program which connects to my server using a seperate thread. They can then communicate back and forth. I have it set that everything has a process id and it's used to keep track of who called what program. Once the program is done it disconnects and closes. Rather than getting into the nitty gritty (I didn't want to get into heavy detail, I know how everything will work) I'm really interested in finding out how I can call a java program from my program. I don't want it to be part of the app in any way.

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • Calling a Java Class from PL/SQL

    Hai,
    I need a technique of calling a class file and invoke its
    methods written in Java by PL/SQL for my intranet development.
    PLease let me know if you have really experienced and won.
    Thanks
    JOhnson

    First, to call a Java class from PL/SQL the class needs to be
    deployed to the database. you can check the 8i documentation for
    the instructions for loading Java into the database(LoadJava).
    The document contains information on how to load the Java and
    call it from PL/SQL. The following links should help.
    Loading Java:
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    java.817/a83728/03write6.htm
    Invoking a Java Method in the database:
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    java.817/a83728/04jserv2.htm
    Gary (JDev Team)

  • I want to call External Java class from the PL/SQL

    Hi,
    I am using Oracle Apps R11i (11.5.7), I wanted to call external Java class from the PL/SQL. This external Java class is residing in another application server.
    How do I do this.
    I know one way. Develop C routine in Oracle Apps to call external java class and call this C routine from the PL/SQL.
    Is there any simple method available? or any other method?
    Thanks in advance.
    -Venkat

    First of all, this is a Java application you're talking about, right (i.e. it has a main() function)? It's not just a class that you're trying to instantiate is it? If it's an application, you obviously have to start a new virtual machine to run it (rather than using the virtual machine built into the database like stored java). I'm a little leary of your mention of an "application server" as this would more commonly mean that a virtual machine is already over there running with access to this class. In which case, you'd typically interface with SOAP or some other RPC API.
    All that aside, as long as you have physical disc access (through NFS or whatever) to the class file, you could use a java wrapper class with a system call to do this. In fact, there is a thread in just the last day or so on this very forum that has the code to do just that (see " Invoking OS Commands from PL/SQL"). However, it's worth noting that the virtual machine will be running on the database server in this case and not the application server.

  • Calling my Java class from JSP page

    Hello, I am trying to call my Java class from my JSP page passing parameters to it and getting back a collection of result sets. Can someone tell me what I might be doing wrong:
    JSP code to call Java class:
    <%
    String strEssUser = "test";
    String strProcessingMonth = "JUL";
    String strProcessingYear = "2002";
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    %>
    I get this error when I try to run this JSP page using tomcat:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\em\jsp\Test_0005fSummarySBU_0005fscreen$jsp.java:77: Class org.apache.jsp.ListReturn not found.
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    I'm not sure if this problem is the way I am calling the Java class, or if I have a problem in the Java code itself. Can anyone help?

    Ok, I get a very strange error now:
    org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
    What is this??? Anyone?

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • Call a Java Function From Abap

    Hi, I need to call a java function from ABAP,  I have a WAS 640 to deploy the module.
    I have found this tutorial...
    [ABAP calls Java via RFC|/people/thorsten.franz3/blog/2008/11/21/abap-calls-java-via-rfc-1-introduction]
    The problem is that it uses a newer version of WAS and it implements EJB 3.0 wich only works on Java 5, but my WAS has java 1.4.2.
    Anyone knows how to adapt this Blog to a WAS 640 version ?
    Or Perhaps there is another way of doing this, maybe publishing my function as a web service.
    Regards.
    Mariano.

    Why don't you expose your Java functionality as a Web Service and consume it in ABAP program. That should be much easier and the web service can be used in other places as well.
    Best regards,
    Ritesh Chopra

  • How to: Calling a java class from asp?

    Hello all i have a problem to call a Java class from a asp
    Here what I do:
    [JavaSays.java]
    package JavaCom;
    public class JavaSays
    public String Hello()
    return "Hello world" ;
    then
    javareg /register /class:JavaCom.JavaSays /progid:JavaCom.JavaSays
    md c:\winnt\Java\TrustLib\JavaCom
    copy JavaSays.class c:\winnt\Java\TrustLib\JavaCom
    --Asp
    --TestJavaCom.asp
    <html>
    <body>
    <h1>Simple Test</h1>
    <% Set ObjPrueba = Server.CreateObject("JavaCom.JavaSays") %>
    <%= ObjPrueba.SimpleFn(5) %>
    <hr>
    </body>
    </html>
    when i try to run my asp
    it tell me that:
    Error type : Server Objetc, ASP 0177 (0x80040111)
    ClassFactory can not find the class
    any idea???
    thanks.

    I think the OP wants to use a class file as a COM object. I've never done that, but this URL:
    http://support.microsoft.com/default.aspx?scid=KB;EN-US;q167941&
    seems to indicate that you should have placed the class file into the c:\winnt\Java\TrustLib\ sub directory before you ran the JAvaReg bat file - I would re-run JavaReg and bounce IIS and associated services and see if that works out.
    Good Luck
    Lee

  • Calling a java class from asp

    Hello all i have a problem to call a Java class from a asp
    Here what I do:
    [JavaSays.java]
    package JavaCom;
    public class JavaSays
    public String Hello()
    return "Hello world" ;
    then
    javareg /register /class:JavaCom.JavaSays /progid:JavaCom.JavaSays
    md c:\winnt\Java\TrustLib\JavaCom
    copy JavaSays.class c:\winnt\Java\TrustLib\JavaCom
    --Asp
    --TestJavaCom.asp
    <html>
    <body>
    <h1>Simple Test</h1>
    <% Set ObjPrueba = Server.CreateObject("JavaCom.JavaSays") %>
    <%= ObjPrueba.SimpleFn(5) %>
    <hr>
    </body>
    </html>
    when i try to run my asp
    it tell me that:
    Error type : Server Objetc, ASP 0177 (0x80040111)
    ClassFactory can not find the class
    any idea???
    thanks.

    any idea???Yes, you are in the wrong forum, this is a Java forum, you have an ASP question, so i suggest you visit an ASP forum/site

  • Call a Java file from ABAP

    Hi,
    I would like your help in identifying a mechanism in calling a Java Program from an ABAP program. The requirement is that I need to pass enough parameters(possibly in a single object like a <i>table</i>) and fetch that in a Java Program residing in a jar in the J2EE engine. The possibility of this java file interpreting this incoming object and also be able to return something to ABAP which can eventually be printed on the screen needs to be known.
    I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory
    "\usr\sap\<i>SystemID</i>\<i>instancenumber</i>j2ee\deploying\lib"
    Appreciate your time and effort in helping me with this.
    Regards,
    Sam.

    i am not sure about
    I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory
    "\usr\sap\SystemID\instancenumberj2ee\deploying\lib"
    but for your case what you could do is, on the java side get developed a jsp page which will receive data and use the jar to proces and return the results as xml. once thats done.
    from abap you can use cl_http_client class to call this jsp page to pass parameters and get the processed results from jsp page.
    Raja

  • Is there an easy way to call a java class from an applet?

    Does anyone know of an easy way to call a server based java class from an applet? Has anyone done it or came across it? If yes how/where?
    Cheers, Chris.

    I'm not sure about the issue. Are you talking about "servelets"? "RMI"? Take a look at those issues.

  • CALL A JAVA PROGRAM FROM ABAP -- NEED HELP

    Hi all,
    Can somebody tell me how to call a java xml code from an ABAP program? First let me know if at all, is it possible to call a java program from SAP that is from an ABAP executable progam?
    Please suggest me in this. All your inputs in this is valuable to me and highly appreciated.
    Thanks in advance,
    Vaishnavi Varadarajan

    Hi,
    Previous explanation i gave is not correct.
    ABAP web services expose the function modules outside R/3, so that other technologies like Java can consume that webservice and read the data in R/3 using the function module.
    For your requirement, create a Java web service to read the XML. Consume this webservice in ABAP. This way you can read the XML from ABAP.
    Regards
    Srikanth KV.

  • Calling Custom Java Class from WCC?

    How do I call a custom Java class from WCC when a certain metadata field is set to 'On' and at the time of check-in?
    Thank you,
    Randy

    Randy,
    You would only use the Intradoc classes if running as a service, service handler, filter or class alias as a component within WebCenter Content. In this case, since it is running inside WebCenter Content, you do not need to bundle the Intradoc classes since they are already on the classpath.
    If you are trying to code something that will not run inside WebCenter Content, you want to use RIDC: http://jonathanhult.com/blog/2012/12/ridc-examples/
    Jonathan
    http://jonathanhult.com

Maybe you are looking for