Results 1 to 9 of 9

Thread: Extend class from loaded DLL

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Extend class from loaded DLL

    How do i extend a class from one that i want to load from a DLL?

    So far i know this. To load the DLL i use

    Code:
    System.loadLibrary("ShellBasics");
    The class that i want to use is

    Code:
    ShellLib.ApplicationDesktopToolbar
    I have looked around and found something about a classloader, but i wasn't to sure if this was only for use with compiled java classes or not? Any help would be great.

    Thanks

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Extend class from loaded DLL

    What kind of DLL is that?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Extend class from loaded DLL

    Quote Originally Posted by CornedBee
    What kind of DLL is that?
    Does it matter?
    it's not Java dll anyway!
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Extend class from loaded DLL

    Yes, it does matter. Is it an ActiveX DLL accessed via the bridge? Is it a JNI DLL implementing a few functions? Or is it a .Net DLL the OP mistakenly believes he can access?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Extend class from loaded DLL

    Can you do it from anyone of those types?
    I mean extend a class

    I'm very curious about that, cause it'd make my life easier
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  6. #6

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Extend class from loaded DLL

    It is a .NET DLL, although i have the source code to it i can implement it though java would rather just use the DLL because im lazy.

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Extend class from loaded DLL

    It's not possible to use .Net classes in Java. The bytecode is different, the virtual machines are different.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Extend class from loaded DLL

    Quote Originally Posted by CornedBee
    It's not possible to use .Net classes in Java. The bytecode is different, the virtual machines are different.
    I thought that's what interoperability is for!
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Extend class from loaded DLL

    Which interoperability? J# is a compiler that attempts to compile Java to .Net bytecode, but it's not Java, and it doesn't have large parts of the Java standard library, so most complex applications probably won't compile.
    .Net and ActiveX - interoperatibility doesn't go any further than that. The Java-ActiveX bridge is a kludge at best. There is, I believe, a project somewhere that attempts to combine a Java and .Net virtual machine into one program so that you can mix their bytecodes, but I have no idea about its progress, or if the idea is even feasible.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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