Results 1 to 7 of 7
  1. #1
    ealopez26 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Use a dll made in .net (C#) COM Visible within JAVA

    Hi,

    I have a dll made in c# with the com visible property enable and I need to use it in a java application to call its methods and properties. Please if anybody know how to do it any help will be highly appreciated.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA

    Look at the Java Native Interface (JNI) framework

  3. #3
    ealopez26 is offline Member
    Join Date
    Sep 2011
    Posts
    2
    Rep Power
    0

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA

    I have but with out luck.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,883
    Rep Power
    25

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA

    If you can not do it with JNI, I have no idea how else you could do it.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA

    Or consider using a Java COM bridge library that can let Java directly call COM automation components such as JACOB, JCom, or Com4j. Note that I have not done this myself and thus cannot vouch for these libraries.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA


  7. #7
    fxRichard is offline Member
    Join Date
    Dec 2008
    Posts
    64
    Rep Power
    0

    Default Re: Use a dll made in .net (C#) COM Visible within JAVA

    You need to wrap the dll calls in a proxy dll of your own via JNI, meaning:

    Java -> myJniDllMethod -> someOtherDllMethod

    you will have to write some native code to do this, if you know JNI it's quite simple but if you don't then you will have to learn it. There may be some wrappers out there that do just this for you however I am unfamiliar with them as I would write this myself.

Similar Threads

  1. Histogram made with array
    By Bowsan22 in forum New To Java
    Replies: 10
    Last Post: 09-07-2011, 04:12 AM
  2. Replies: 2
    Last Post: 06-30-2010, 08:19 AM
  3. No class made
    By ChuckLS in forum New To Java
    Replies: 1
    Last Post: 04-28-2009, 05:54 PM
  4. Replies: 2
    Last Post: 03-22-2009, 07:43 PM

Posting Permissions

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