Thread: How to call java code from c++ program

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    1

    How to call java code from c++ program

    Hi,

    Please let me know how to call java code from the c++ application, I have code written in c++ and i would like to use the java code of "Big Faceless PDF Library" at URL big.faceless.org/products/pdf/, which is written in java use to create PDF files.

    Thanks,
    sam.

  2. #2
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    There's no standard way to do this. You should check your C++ compiler documentation if such option exists.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    ... which is very unlikely.

    What you should do is learn about JNI (the Java Native Interface) and embedding a virtual machine in your program.

    Which in my opinion is overkill. There must be a PDF generation library for C or C++ out there.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to properly call an executable from C code?
    By remy06 in forum C Programming
    Replies: 3
    Last Post: 05-14-2009, 03:48 AM
  2. large program code ,please help
    By Ash1981 in forum C Programming
    Replies: 14
    Last Post: 01-30-2006, 06:16 AM
  3. Help with a Function Call Program.
    By DazzaE2005 in forum C Programming
    Replies: 10
    Last Post: 04-05-2005, 04:22 AM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM