Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Java and C++

  • 09-04-2002 03:24PM
    #1
    Closed Accounts Posts: 536 ✭✭✭


    I'm trying to include a c++ library into my Java application.
    Does anyone know how to do this?


Comments

  • Registered Users, Registered Users 2 Posts: 6,676 ✭✭✭Blitzkrieger


    I'm sure the answer was posted on the boards somewhere before buf ****ed if I can find it :)


  • Registered Users, Registered Users 2, Paid Member Posts: 2,032 ✭✭✭lynchie


    Have a look at the tutorials on Sun's website on JNI

    JNI Tutorial


  • Closed Accounts Posts: 536 ✭✭✭flyz


    Originally posted by lynchie
    Have a look at the tutorials on Sun's website on JNI

    JNI Tutorial

    Thanks lynchie gave me an idea what to do anyway.

    still having problems though, trying to figure out how to link an existing library to my java code, that tutorial shows you how to create a new one and link it.


    Can you link a .lib or does it have to be a dll??


  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭Zab


    You could write your own DLL to wrap around the C++ library. The C++ code would probably be very minimal. I'm sure that tutorial explains how to do it, then its just a matter of writing an interface for the library your using.

    Zab


Advertisement