I like the way plug-ins work in eclipse. Just extract your plug-ins in to a specific folder. So, my application also would have a similar plug-in mechanism.
Following is the way I have implemented the plug-in manager:
Get to plugins directory
For each file in plugins directory
If file ends with ".jar"
See if there is a plugin-manifest.xml inside the jar
If found read the XML and get data about the Plugin
Save plugin data to a list/map for future use
Add the jar to current classpath as plugin may be used.
End if
End if
End for
No comments:
Post a Comment