Classloading in JLenseClassloading in Eclipse and JLense can be confusing for developers that are not used to working within a container that handles classloading for them. For instance, most web application developers that deploy thier applications inside a servlet engine are used to having the servlet engine manage all classloading. By contrast, most Swing developers are used to controlling the classpath themselves. An Eclipse application is composed entirely of plugins. The Eclipse runtime engine manages classloading for each plugin. Therefore, the only classes that are visible to a plugin are those classes which the Eclipse runtime engine makes visible to the plugin. The only way to make classes visible to a plugin is to configure the plugin manifest file to include an <import> tag for the classes it requires in the <requires> section of the plugin manifest. See this article on the plugin manifest for more information on how to configure a plugin so that the classes it requires are available to it. JLense Classloading Best PracticesMost Eclipse plugins contain a jar file that contains all of the plugin's classes. A corresponding <library> tag that specifies the jar file is included in the <runtime> section of the plugin's manifest. One thing that developers may notice about JLense is that the JLense and JLedger plugins do not package thier classes into jar files. JLense and JLedger plugin directories contain a classes directory that contains the plugin's classes. The reason for this is that it is much more convenient to develop plugins with this configuration. This is the typical code/compile/debug cycle when plugins include a jar file in thier plugin directory...
By putting all classes into a classes directory the code/compile/debug is shortened to this..
When using an IDE like Eclipse that can hot-swap code the code/compile/debug cycle becomes even shorter...
|