CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Location
    California, USA
    Posts
    69

    connecting java and c

    Hello All,
    One of my co worker in the company is having a wierd problem. He has a gui which is implemented in java. Where he has a text box in which user has to give some input. Now he has to retrieve this value from the text box using a c program because the firmware supports c language. So, how can we do that in c .. .is there any interface that connects java gui and c together ??? or suggest any other way of dealing things like this..


    any input is appreciated...

    thanks,
    Rani

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: connecting java and c

    It's certainly possible; CORBA can do it (but is probably overkill in this case).

    The simplest thing may be to spawn the GUI from the C program as a separate process, and communicate with it via pipes.

  3. #3
    Join Date
    Jan 2006
    Location
    California, USA
    Posts
    69

    Re: connecting java and c

    Let me understand what u mean...

    create a thread in c which would separately interact with java program with the help of corba. ryt ??

  4. #4
    Join Date
    Apr 1999
    Posts
    27,449

    Re: connecting java and c

    Quote Originally Posted by rani_techie
    Hello All,
    One of my co worker in the company is having a wierd problem. He has a gui which is implemented in java. Where he has a text box in which user has to give some input. Now he has to retrieve this value from the text box using a c program
    Why must the value be retrieved from the textbox directly in C? Why can't the Java program read the value entered in the textbox, and then send that value to a C module?

    In this case, use JNI.

    Regards,

    Paul McKenzie

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured