Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Java GUI for a c program

  • 18-10-2004 5:05pm
    #1
    Registered Users, Registered Users 2 Posts: 1,362 ✭✭✭


    Is it possible to create a GUI programmed in Java to send commands to a C program? I just want to avoid creating a GUI in C cos it seems a bit more tedious than java. thanks


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Yes. Google for Java Native Interfaces.


  • Registered Users, Registered Users 2 Posts: 1,362 ✭✭✭tw0nk


    thanks doodle sketch, would you recommend using eclipse to program it? im currently just using crimson multipurpose editor,i hear there are some really good plugins for eclipse


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Never really used Eclipse myself, though it does come highly recommended... Personally, I've always been a fan of Borland JBuilderX, which, while it comes with a GUI editor, isn't as plugable as Eclipse, but that generally doesn't matter as I sculpt my own GUIs... I'm a masochist, I know... :D


  • Closed Accounts Posts: 79 ✭✭zt


    The other option is some type of client server operation. Maybe a bit of IIOP and CORBA.

    This has the advantage the you don't need to collocate the GUI and the C part.


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Yes use eclipse. It's one of the best IDE's out there.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,362 ✭✭✭tw0nk


    Ok, i got eclipse 3, and I have to say Im very impressed, its so user friendly, im gonna go and download a few plugins for it for different things, there are a few ones i like, would anyone recommend any particular ones for gui's?


  • Registered Users, Registered Users 2 Posts: 261 ✭✭HaVoC


    Hey zt do u know any good sites on developing such an architecture maybe a few examples? I’m doing a project in that area at the moment. Just cant get my head around how you would do the interface between 2 different languages


  • Closed Accounts Posts: 79 ✭✭zt


    The basic idea is that you code a server implementation and provide a generic interface to access the underlying implementation.

    In the CORBA world, interfaces are defined using IDL (inteface definition language). This is a neutral language for specifying the methods etc that a particular object provides.

    You then get an IDL compiler for the languages / versions / compilers you wish to support. This generates code that you then compile with your application.

    IIOP is the protocol used to exchange messages in CORBA and RMI. This is strictly defined and takes care of network representation etc. The theory is that you don't need to worry about how messages get from one place to another.

    This can be compared directly to a web server. HTTP is the independent protocol. You can easily have different clients such as a web browser (GUI), a command line version (say wget on linux) or spiders/crawlers.

    I would suggest that your best starting point is the SUN JAVA RMI demo. It is here . Although Java only it gives the basics of interfaces, implementation servers etc.

    You could also look at the iona tech web site. This had a great demo/tutorial about 5 years ago.

    These days when I'm writing some sort of application that requires communication with other components, I would generally opt for using a web server as the starting point for my server. It is pretty quick to write some servlets that generate XML. A web client doesn't have to be a web browser.

    It also has the advantage that you can test the protocol using a simple web browser. Once you are happy with the server side you can use what ever language to develop a client that speaks HTTP and deals with XML responses.


Advertisement