HOw to call C/C++ Program in Java.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lovetopravin
    New Member
    • Oct 2013
    • 16

    HOw to call C/C++ Program in Java.

    I want to call C program from java.

    Pravin Mangalam
  • chaarmann
    Recognized Expert Contributor
    • Nov 2007
    • 785

    #2
    Either put it in a "native" method (fastest execution time),
    (see "write native methods in java")

    or compile it and then call it via a shell:
    Code:
    Runtime.getRuntime().exec("myProgram.exe")

    Comment

    • lovetopravin
      New Member
      • Oct 2013
      • 16

      #3
      Thank You so so much..

      Pravin Mangalam

      Comment

      Working...