﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-arka-随笔分类-Eclipse FAQ</title><link>http://www.blogjava.net/arka/category/7193.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 02 Mar 2007 06:50:36 GMT</lastBuildDate><pubDate>Fri, 02 Mar 2007 06:50:36 GMT</pubDate><ttl>60</ttl><item><title>FAQ 105 插件开发的classPath</title><link>http://www.blogjava.net/arka/archive/2006/01/24/29136.html</link><dc:creator>arka</dc:creator><author>arka</author><pubDate>Tue, 24 Jan 2006 11:48:00 GMT</pubDate><guid>http://www.blogjava.net/arka/archive/2006/01/24/29136.html</guid><wfw:comment>http://www.blogjava.net/arka/comments/29136.html</wfw:comment><comments>http://www.blogjava.net/arka/archive/2006/01/24/29136.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/arka/comments/commentRss/29136.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/arka/services/trackbacks/29136.html</trackback:ping><description><![CDATA[<p>想在自己的插件中导入一个dom4j.jar包，否则通过不了编译，除了wrapped&nbsp; library plugin方式，难道没其他的办法了吗&nbsp;，在书上找了一段：</p>
<p>A JAR can be added to the classpath of a plug-in in four ways. </p>
<ol>
    <li>The JAR can be added to the boot classpath. This is generally a bad idea, however, as it requires an extra VM argument, and it also affects the classpath of all other installed plug-ins. If the JAR adds types&mdash;classes or interfaces&mdash;that mask types declared in other plug-ins, you will probably break those other plug-ins. Nonetheless, if you are looking for a quick and dirty hack, this is the easiest approach.
    <p>&nbsp;</p>
    </li>
    <li>The JAR can be added to the declared libraries for a plug-in. This is fine if you don&rsquo;t anticipate a need for other plug-ins also to use that JAR.
    <p>&nbsp;</p>
    </li>
    <li>A new plug-in can be created that is a wrapper for the library; then the new plug-in is added to the list of required plug-ins for all plug-ins that want access to the library.
    <p>&nbsp;</p>
    </li>
    <li>The OSGi parent loader can be changed by setting the <tt>osgi.parentClassloader</tt> system property on startup. This is also generally a bad idea, for the same reasons listed for changing the boot classpath.
    <p>&nbsp;</p>
    </li>
</ol>
<p>好像第二种满足要求，但哪位知道怎么设置？</p><img src ="http://www.blogjava.net/arka/aggbug/29136.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/arka/" target="_blank">arka</a> 2006-01-24 19:48 <a href="http://www.blogjava.net/arka/archive/2006/01/24/29136.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>