CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Calling java functions from c++

  1. #1
    Join Date
    Sep 2008
    Posts
    17

    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
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,858

    Re: Calling java functions from c++

    From the Java side look at Java Native Interface JNI
    Norm

  3. #3
    Join Date
    Sep 2008
    Posts
    17

    Re: Calling java functions from c++

    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.

  4. #4
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,858

    Re: Calling java functions from c++

    This is a java forum. Have you asked on a c++ forum?
    Norm

  5. #5
    Join Date
    Sep 2008
    Posts
    17

    Re: Calling java functions from c++

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

  6. #6
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Calling java functions from c++

    I just Googled for "calling java from c++", got 375,000 results, and the first one, at the top of the list, was an article that, surprise, surprise, covered how to call Java from C++.

    There are perhaps 5% of the population that simply *can't* think.
    There are another 5% who *can*, and *do*.
    The remaining 90% *can* think, but *don't*...

    Robert A. Heinlein
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  7. #7
    Join Date
    Jul 2005
    Location
    Currently in Mexico City
    Posts
    568

    Re: Calling java functions from c++

    Haven't ever done that, though the first thing that accures to me is to call an executable java class using c++ as you would execute any console command.

    Also .NET2 gives a possibility to code any function/module using any of .NET2 languages, inculing Java. The only problem there is that it would be MS Java, the one that uses MFC.

    Looked at some articles in google. Some explain your question with great detail. The resume is: google it before asking... =P
    Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?

    I had a nightmare last night. I was dreaming that Iím 64-bit and my blanket is 32-bit and I couldnít cover myself with it, so Iíve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)

    //always looking for job opportunities in AU/NZ/US/CA/Europe :P
    willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));

    USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)