Jitsi 包括用于定制的外部 jar

Jitsi include external jar for customization

目前我正在致力于开源 Jitsi 的定制。不知何故,我想添加第 3 方 jar 进行自定义。

我尝试了很多方法来包含第 3 方 jar,但我遇到了这个错误。

所以请帮助我摆脱这个错误或提供一些指导来添加第 3 方 jar。

Auto-properties install: reference:file:sc-bundles/commons-vfs2-2.0.jar (org.osgi.framework.BundleException: Unable to cache bundle: reference:file:sc-bundles/commons-vfs2-2.0.jar - java.io.IOException: Referenced file does not exist: sc-bundles\commons-vfs2-2.0.jar)
     [java] org.osgi.framework.BundleException: Unable to cache bundle: reference:file:sc-bundles/commons-vfs2-2.0.jar
     [java]     at org.apache.felix.framework.Felix.installBundle(Felix.java:2876)
     [java]     at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
     [java]     at org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:296)
     [java]     at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:79)
     [java]     at org.apache.felix.main.Main.main(Main.java:292)
     [java]     at net.java.sip.communicator.launcher.SIPCommunicator.main(SIPCommunicator.java:219)
     [java] Caused by: java.io.IOException: Referenced file does not exist: sc-bundles\commons-vfs2-2.0.jar
     [java]     at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:852)
     [java]     at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
     [java]     at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
     [java]     at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
     [java]     at org.apache.felix.framework.Felix.installBundle(Felix.java:2872)
     [java]     ... 5 more

将您的 JAR 文件 (custom.jar) 添加到 lib/ 目录。然后如下所示编辑这两个文件:

jitsi.eml - 将以下条目添加到文件中:

<lib name="custom.jar" scope="COMPILE">
    <relative-module-cls project-related="jar://$PROJECT_DIR$/lib/custom.jar!/"/>
</lib>

nbproject/project.xml - 搜索 <classpath mode="compile">(有两个这样的事件)并将您的 jar 文件登记为

<classpath mode="compile">lib/custom.jar:lib/felix.jar:[MORE JARS HERE]</classpath>

<classpath mode="compile">classes:lib/custom.jar:lib/felix.jar:[MORE JARS HERE]</classpath>

编辑文件后,运行 ant clean;蚂蚁清理包;蚂蚁制造

你可以开始了。