I have an applet uses ClassLoaders to load sections of the application when they are needed. Many sections use identical classes to handle such things as date handling and DB access.
Is there a way in Java to reuse the same code like a DLL? Java seems to treat the same class loaded by different ClassLoaders as different code, so wants to load it again.
I could just implement all the common code in the stub applet and use Class.getMethod and Method.Invoke, but this seems a longwinded and tedious way of doing it. Is there a solution based around, say, Javabeans, where the module know about the methods and properties already?
Any help greatly appreciated.
Is there a way in Java to reuse the same code like a DLL? Java seems to treat the same class loaded by different ClassLoaders as different code, so wants to load it again.
I could just implement all the common code in the stub applet and use Class.getMethod and Method.Invoke, but this seems a longwinded and tedious way of doing it. Is there a solution based around, say, Javabeans, where the module know about the methods and properties already?
Any help greatly appreciated.