How to call my java program in vb?

Hello ,
first of all i will tell my bussiness logic,
i have designed a module in java for plotting a graph and the other module are written in vb so, i should call my module in vb,is the only method to do is calling my .bat file or is there any method that my module is called in vb.please let me know its urgent....

GOT IT !!!
I had to change the name of the method in .h file generated by javah command. On doing
javac -d ../../classes HelloWorld.java
go to the ../../classes directory (where you have the class file) and do
javah HelloWorld
I got a HelloWorld.h file in which I had
JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
I added the package name too:
JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
compile and build the shared library to get "libhello.so" file
gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
gives .o file
gcc -shared -o libhello.so HelloWorldImp.o
gives .so file
then run java with the command in my first message. It works.
Thanks for the reply "thedracle".

Similar Messages

  • How to call a java program in javafx class(Urgent) and even vice versa

    Hi all,
    Here I have two questions:
    1)
    Please let me know how to call a javafx in java program...
    I tried with the following code but it is not working..
    The below is the java program in which I made a call to the Fx program.
    FxMainLauncher.java
    import net.java.javafx.FXShell;
    public class FxMainLauncher {
    public static void main(String[] args) throws Exception {
    FXShell.main(new String[] {"HelloWorld.fx"});
    2) How to call a java program in javafx class
    Here is my javafx program
    import check.*;
    import javafx.ui.*
    var instance = new MyJava();
    //visible:true
    System.out.println("Number is: {instance}");
    Here is my java program
    public class MyJava {
    public static void main(String args[])
    System.out.println("JAVAFX TO JAVA");
    Even this is not working please let me know ASAP
    Thanks in advance,
    V.Srilakshmi

    GOT IT !!!
    I had to change the name of the method in .h file generated by javah command. On doing
    javac -d ../../classes HelloWorld.java
    go to the ../../classes directory (where you have the class file) and do
    javah HelloWorld
    I got a HelloWorld.h file in which I had
    JNIEXPORT void JNICALL Java_HelloWorld_display(JNIEnv *, jobject);
    I added the package name too:
    JNIEXPORT void JNICALL Java_GUI_HelloWorld_display(JNIEnv *, jobject);
    The HelloWorldImp.c file should have the same name (ie with package) and be in the same directory(ie ../../classes)
    compile and build the shared library to get "libhello.so" file
    gcc -c -fPIC -I/usr/lib/j2sdk1.3/include -I/usr/lib/j2sdk1.3/include/linux HelloWorldImp.c
    gives .o file
    gcc -shared -o libhello.so HelloWorldImp.o
    gives .so file
    then run java with the command in my first message. It works.
    Thanks for the reply "thedracle".

  • Requesting an overview of how to call a Java program from EBS.

    Hi,
    I am an experienced Java developer in the middle of an implementation of EBS 12g. I am very new to EBS and I'm not sure where to start on this. I need to provide users the ability to call a Java program that prints a report from EBS. I would be grateful if somebody would outline the general approach that should be used. Links to documentation/tutorials are appreciated also.
    Thanks,
    Mike

    Hi,
    I need to provide users the ability to call a Java program that prints a report from EBS. Are you referring to Java concurrent programs? If yes, please see the documents referenced in this thread.
    Java Concurrent Programs
    Java Concurrent Programs
    Regards,
    Hussein

  • How can I call a java-program as receiver

    Hi Folks,
    I have to call a java program, based on the XI-Server as receiver. My qustions are:
    What is the right adapter type
    What are the parameters to give the xml to the program
    Thanks a lot
    matthias

    Hi Mathias,
    I would suggest, generate a java proxy of ur inbound interface (reciever).
    1. In the java proxy implementation method you will
        have  access to the message sent to the interface,
    2. You could then use this message(XML) and Call ur
        custom java program from the java proxy.
    here is a link on how to implement java proxies
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Naveen

  • How to Call abap functn/program from java layer

    Hi all,
        I have to develop a program which has to call abap function/program from java side or how to call a abap program through java ..
    pls send me related links or explanations.. dont send unrelated answers..
    Regards,
    Arivarasu S

    Hi,
    You mean accessing ABAP functions from J2EE perspective, then I think we can do this by using SAP Java Resource Adapter and also through webservices.
    SAP Java Resource Adapter (SAP JRA) can be used as an add-on for the SAP JCo SAP JRA enables the implementation of standard interfaces from diverse J2EE servers to the SAP JCo in the SAP Web AS. The SAP JRA thus simplifies
    communication with ABAP within heterogeneous J2EE landscapes.
    Go through the following links which has Good documentation on how to achieve this
    Accessing BAPIs Using the SAP Java Resource Adapter
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4]
    Connectivity and Interoperability
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/326d82e5-0601-0010-fca4-9caf27b89c26]
    Finally with WebServices. Accessing SAP Business Functions (ABAP) via Web Services
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561a3c4]
    Regards
    Raghu

  • I need to call a java program and pass parameters from C#

    I'm new to C# and was given a project to rewrite some of my old VB.net programs to C# to help me learn.  These VB programs call quite a few .bat files that have calls to java programs in them. I'm doing okay converting my VB code, but I've been
    stumped for days trying to figure out how to call java from C#. 
    Does anyone here know how to do this?  I really should've had this figured out by now and my back is to the wall.  Ugh :(
    This is the line from the .bat file that I need to convert to C#. 
    call jvbat production_r115.Automotive m:\data\MK115mn.100 m:\data\MK115mn.101 %6
    There is one parameters being passed, %6
    I would be forever grateful if someone can show me how to do this!

    Hi Joni,
    Do you mean call a bat file that it is a Java program from C#?  If so, there is an article talking about it.
    If that's not what you're trying to do, please be more specific about what you're trying to do.
    http://www.c-sharpcorner.com/UploadFile/maheswararao/CallingJavaProgramfromCS12062005233321PM/CallingJavaProgramfromCS.aspx
    Now the next issue is pass some parameters from C#.
    The above article tells using Process.Start() method to call java program. Also  in this class, you could  specify them all in the
    Arguments property:
    var p = new Process();
    p.StartInfo.Arguments = string.Format("{0} {1}", argument1, argument2);
    For more detailed information, please refer to
    C# Passing Multiple Arguments to BAT File
    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control
    these sites and has not tested any software or information found on these sites;
    Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information
    found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Calling a Java program in OWB

    HI
    Is it possible to call a Java program in OWB_902560.
    If so how ...Pls. advice me..
    Thanks
    Narasimha.

    You can call PL/SQL programs from OWB either by defining transformations or as expressions. From PL/SQL you can call a java stored procedures in the database as follows:
    1. Define the java stored procedure. For example, let's suppose that you store the following Java class in the database:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class Adjuster {
    public static void raiseSalary (int empNo, float percent)
    throws SQLException {
    Connection conn = new OracleDriver().defaultConnection();
    String sql = "UPDATE emp SET sal = sal * ? WHERE empno = ?";
    try {
    PreparedStatement pstmt = conn.prepareStatement(sql);
    pstmt.setFloat(1, (1 + percent / 100));
    pstmt.setInt(2, empNo);
    pstmt.executeUpdate();
    pstmt.close();
    } catch (SQLException e) {System.err.println(e.getMessage());}
    2. The class Adjuster has one method, which raises the salary of an employee by a given percentage. Because raiseSalary is a void method, you publish it as a procedure using this call spec:
    CREATE PROCEDURE raise_salary (empno NUMBER, pct NUMBER)
    AS LANGUAGE JAVA
    NAME 'Adjuster.raiseSalary(int, float)';
    3. Call procedure raise_salary from an anonymous PL/SQL block, as follows:Long postings are being truncated to ~1 kB at this time.

  • Type conversion when calling a java program in form 6i

    Hi,
    I would like to call a java program in form 6i. The java program takes a date parameter in. When I call the java program in form, how can I pass a date parameter to it?
    -- Method: isSystemDate (Ljava/util/Date;)Ljava/lang/String;
    FUNCTION isSystemDate(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN VARCHAR2;
    Thanks.

    hi Tony,
    Perhaps you could notice that i myself commented in the beginning itself that I know that XE does not support JAVA. I wanted to know if there is any other way of calling java program from apex, perhaps from javascript,etc.
    if you RE READ the comment from Munky , he says that I could use PL/SQL for my objective and I have answered WHY it does not satisfy my problem
    thanks
    Edited by: eric clapton on Nov 14, 2010 9:11 AM

  • 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.

  • 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()

  • How to call a java script in while eventprocessing?

    hi friends,
    How to call a java script from an event.
    when i click a button, i want to display a message in IE.
    For ex: BTN_CAN,
    When i click on this in IE i want show a message like "clicked on cancelled".
    how can i do this.....
    in javascript WINDOW.ALERT i am trying....
    Regards,
    Shankar.

    you can do some thing like this...
    < % @  pa g e la ng uag  e="a b ap" %>
    < % @ e xte n sion name="htmlb" prefix="h tm l b"  %  >
    <  h t  m l b:co  nt e nt d es ign="design2 00  3"  >
      <  ht m lb:page title=" "    >
        <  h tm lb :for m  >
           < h t  mlb:textVi ew text   = "Hello World!"
                          des  ign = "EMPHASIZED" />
          < ht  m lb  :bu  tton text          = "Press Me"
                         on  Clie  ntC lick = "al ert(' H ell  w or l d')"  / >
        <  / h t mlb  :for m >
      < / ht mlb :pa g e >
    <   / htm lb:co nt e nt >
    Edited by: Vijay Babu Dudla on Oct 6, 2008 7:20 AM

  • How to call a java script?

    Hi,
    I m new to Indesign and also to MAC OS...
    I ve tried the sdk samples of InDesign CS3 on MAC OS. It works well.
    I m making changes to one of the samples (BasicPanel). I ve added few check boxes and buttons in it. I donno where to give the code for button(in the panel) event/action?
    I also need to know "how to call a java script from InDesign CS3 SDK ?"...
    I have the Scripts ready... Can someone provide the code used to call JS...
    Someone pls help me.....
    Thank You...

            Here s the code to call a Javascript:
            IDFile scriptFile;
            FileUtils::GetAppInstallationFolder(&scriptFile);                    //application folder path
            FileUtils::AppendPath(&scriptFile, PMString("Scripts", -1, PMString::kNoTranslate));               
            FileUtils::AppendPath(&scriptFile, PMString("Scripts Panel", -1, PMString::kNoTranslate));
            //inside the scripts panel, append path of the folder in which ur script is present.
            //Suppose, ScriptsPanel->NewFolder->Link.jsx
            FileUtils::AppendPath(&scriptFile, PMString("NewFolder", -1, PMString::kNoTranslate)); 
            FileUtils::AppendPath(&scriptFile, PMString("Link.jsx", -1, PMString::kNoTranslate));
            InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
            bool filestatus=scriptRunner->CanHandleFile(scriptFile);
            if(filestatus==1)
                scriptRunner->RunFile(scriptFile,kTrue,kFalse);
    Regards,
    tnhems

  • Calling a JAVA program from an RFC in SAP ABAP

    Hi All,
    I have an RFC for a specific purpose in which I need to call a JAVA program whose path is given to me. Please suggest a possible process to do the same .
    Your's <removed by moderator> responce is highly appreciated.
    Thank you.
    Edited by: Thomas Zloch on Nov 26, 2010 1:33 PM - priority normalised

    Hi Priyanth,
      I am not sure but check this out
      If you are using any commands , check if that command is configured in SM69

  • How to make a Java program that recognises a function of two variables...

    How to make a Java program that recognises a function of two variables to assign values to that?
    First I will give an example and then do the question.
    Ex1.
    We have any function, eg.y = x ^ 2 + 1 (read 'y' equals 'x' high to the square), a function of the second degree.
    To build the graph of this function attach values to 'x' to find the values of 'y'
    And thus mount the pair ordered (x, y) which represents a point on the Cartesian plane.
    Assigning values to 'x' 'we can build up a table that gives us the pairs ordered:
    We can use any numbers, but arfer interval [-3.3]
    X | y = x ^ 2 + 1
    -3 | Y = (-3) ^ 2 +1 = 10
    -2 | Y = (-2) ^ 2 +1 = 5
    -1 | Y = (-1) ^ 2 +1 = 2
    0 | y = (0) ^ 2 +1 = 1
    1 | y = (1) ^ 2 +1 = 2
    2 | y = (2) ^ 2 +1 = 5
    3 | y = (3) ^ 2 +1 = 10
    We then ordered the pairs:
    (-3.10), (-2.5); (-1.2), (0,1), (1,2), (2,5), (3,10)
    Tabem that can be represented by a table:
    X | y
    -3 | Y = 10
    -2 | Y = 5
    -1 | Y = 2
    0 | y = 1
    1 | y = 2
    2 | y = 5
    3 | y = 10
    Now I begin to explain my doubts.
    See this program:
    Ex2
    * To change this template, choose Tools | Templates
    * And open the template in the editor.
    Encontrando_o_valor_de_y package;
    * @ Author des Soldat Gottes
    Import javax.swing.JOptionPane;
    Public class (Main
    * @ Param args the command line arguments
    Public static void main (String [] args) (
    Int x, y;
    String x1;
    X1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
    "Assign a value for 'x',"); / / receives a value for the function y = x + 1
    X = Integer.parseInt (x1); / / tranforma String in int
    Y = x + 1; / / receives the value of 'x' and calculates' y '
    JOptionPane.showMessageDialog (null, "The value of 'y' is: \ t \ t" + y);
    / / Displays the value of 'y'
    System.exit (0);
    We see that the program receives above a value for 'x' and replaces the function contained in the program, y = x + 1, and so is the value of the variable 'y'.
    In: x1 = JOptionPane.showInputDialog ( "We have the function y = x + 1 \ n" +
    "Assign a value for 'x',");
    The entry is a number and that number is assigned aa ja existing function in the (y = x + 1).
    The question is: would it be possible to come to a function?
    Ex: the program ask: DIGITE THE FUNCTION?
    The USUARIO DIGITARIA A FUNCTION ANY, TYPE: y = x ^ 2 +1
    The program would recognize the function and give numerical values to that function as Ex1, at the beginning of this text.
    And then to find the values of the x and y launch a table.
    It would be possible that?
    By invez of entering with a number so that the program sustitua a function ja existing as Ex2, seen above, entering with a function quaquer (type: y = x ^ 2 +1) for the program atribuisse values to that function and then create a table of values as Ex1.
    I hope it has been easier to understand my doubts now.
    Thank you for your attention!
    God bless!

    rafaelmenezes wrote:
    Thanks for the explanation, could understand what fly said.
    But as it applied to a program?
    How to create a program that recognizes that the entry coefficients?Are you asking about how to parse out the coefficients from the string "3x^4 + 4x^3 - 8x^2 + 5x^1 + 2x^0"? If you define the format to strictly follow that example, this should get you started:
    Strip out the spaces
    Split the String on "x^"
    That should give you [3, 4+4, 3-8, 2+5, 1+2, 0]
    Split each resulting String on "+ | -", preserving the operator as a token so you can apply the correct sign to the coeff.
    That should leave you with [3, 4, +, 4, 3, -, 8, 2, +, 5, 1, +, 2, 0]. Every other number is a coeff, the rest are the degrees.
    You can strip out the +, since those coeffs are already positive, and strip out the - after negating the following number. This is all assuming that you have to write this yourself. There is no doubt already a library or 5 out there that does this for you.

  • How to call the abap program in workflow

    HI Exeprts,
    I need to call one abap program in workflow.
    can any tell me how to call the abap program in workflow.
    thanks &regards
    ramesh

    Dear Ramesh,
    U can use REPORT business object.
    Method : EXECUTE_2
    Regards,
    Sagar

Maybe you are looking for

  • Dual boot CentOS and Windows 7

    Hello, I am looking for such solutions wherein I can have CentOS as a dual boot along with WIndows 7. I tried searching for resources and found the following link very helpful. http://www.techotopia.com/index.php/Installing_CentOS_6_with_Windows_in_a

  • Headphone / Optical Dig. Out to Stereo Headphone jack?

    Goal: To output sound from my Powerbook G4 to my stereo speakers. Problem: My stereo is an older model and only has a headphone jack (no RCA); the speakers connect via bare wires and clips in the back of the main base unit. Question: What are my opti

  • Release strategy for Release POs

    Hi Every one, We have a requirement. A contract is created and approved as per the regular strategy. The releases (POs) are created against it and sent directly to the vendor. As the Contract is already approved, standard SAP does not apply the relea

  • File failing with ICM_HTTP_CONNECTION_BROKEN error in SAP PI

    Hi Expert, We have file to proxy senario in our production environment where, while sending the file from PI to ECC syestem via proxy, it fails below with error in call adapter step. Have tried with many options mentioned in scn.sap.com site like 1.

  • Assignment to CO object

    Hi,, While creating PO against sales order (Job work) then it does allow to save and shows error message as "Account xxxxxxx requires an assignment to a CO object" in production server. The GL is maintained as primary cost element. I have already mai