2016-04-21 77 views
1

目前我正在開源Jitsi的定製。不知何故,我想添加第三方jar來進行自定義。Jitsi包括定製的外部罐子

我試了很多,包括第三方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 
+0

它看起來像它試圖加載'從路徑公地vfs2-2.0'(這大概,你在什麼地方規定),但它不存在該位置。 – AlBlue

+1

@AlBlue我檢查了路徑,它存在於該位置,我也將它包含在classpath中。 – Darshit

回答

2

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> 

編輯文件後,運行螞蟻乾淨;螞蟻清潔束;螞蟻做

,你是好去。

+0

謝謝!它像一個魅力工作! – Darshit