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
Re: Extend class from loaded DLL
What kind of DLL is that?
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!
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?
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 :)
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.
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.
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!
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.