Results 1 to 14 of 14
  1. #1
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default Calling java functions from c++

    I want to start my program from visual c++ then, call java functions and then calling c++ function. How can i do this?

  2. #2
    ojn
    ojn is offline Senior Member
    Join Date
    Aug 2008
    Location
    Stockholm, Sweden
    Posts
    119
    Rep Power
    0

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,560
    Rep Power
    25

    Default

    What answers did you get to this question on Code guru?

  4. #4
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default

    I want to execute c++ program first then call java function from that. I have done calling c++ from from executing java function but unable to do reverse.

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,560
    Rep Power
    25

  6. #6
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default

    C/C++ forums members asked me the same question as JNI belongs to java not c/c++.

  7. #7
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,560
    Rep Power
    25

    Default

    If a java programmer does not know c++
    how could he advise you on how to write a c++ program?

  8. #8
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default

    I don't want to know how to write c++ program but how to use JNI to call java function from visual C++. Obviously, C++ programmer does not know anything about JNI if he does not know java.

  9. #9
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default ET Phone Home ...

    I'm not following this at all...

    • you want to call a C++ program (from Java) that calls a Java method? or
    • you want to call a Java method that calls a C++ program that calls a Java method? or
    • Something else

    Maybe it would be easier to use a diagram (to help explain what you need)... something like:

    Java -> C++ -> Java
    or
    C++ -> Java -> C++
    or
    Java -> Java -> C++

    CJSL
    Last edited by CJSLMAN; 10-19-2008 at 11:41 PM.
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  10. #10
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default

    Diagrammatically it is like this

    C++ -> Java -> C++

  11. #11
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,560
    Rep Power
    25

    Default

    What did you find using Google?
    Your other postings told you about it.

  12. #12
    khajalid is offline Member
    Join Date
    Sep 2008
    Posts
    31
    Rep Power
    0

    Default

    I find JAVA -> C++ -> JAVA

  13. #13
    missshirin is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Default

    Hi,
    Have you found any solution for your problem?
    I have the same problem!:(

    thanks.

  14. #14
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. calling a java application from another
    By kratoras in forum New To Java
    Replies: 1
    Last Post: 06-14-2008, 02:54 AM
  2. Calling Java Function through JSP
    By Vikrant Pawar in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 06-06-2008, 06:28 AM
  3. calling a C routine from JAVA running in AIX
    By jcosta in forum New To Java
    Replies: 1
    Last Post: 01-13-2008, 07:05 PM
  4. java copy paste cut and undo functions
    By Mr tuition in forum AWT / Swing
    Replies: 1
    Last Post: 12-09-2007, 12:02 AM
  5. calling a java class from html
    By Ed in forum Advanced Java
    Replies: 1
    Last Post: 07-08-2007, 12:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •