2014-05-21 65 views
0

大家好我收到以下錯誤,當我試圖運行一個開源項目,任何想法,以避免這些錯誤,Eclipse的Java項目不能與一些奇怪的錯誤運行

Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problems: 
    The import net cannot be resolved 
    The import net cannot be resolved 
    The import net cannot be resolved 
    PacketSource cannot be resolved to a type 
    PacketSource cannot be resolved to a type 
    BuildSource cannot be resolved 
    PacketSource cannot be resolved to a type 
    PacketSource cannot be resolved to a type 
    PrintStreamMessenger cannot be resolved to a variable 
    PacketSource cannot be resolved to a type 
    PacketSource cannot be resolved to a type 
    PacketSource cannot be resolved to a type 
    PrintStreamMessenger cannot be resolved to a variable 
    PacketSource cannot be resolved to a type 

    at Classes.snifferImpl.<init>(snifferImpl.java:32) 
    at Classes.Zmonitor$1$1.run(Zmonitor.java:86) 
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251) 
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733) 
    at java.awt.EventQueue.access$200(EventQueue.java:103) 
    at java.awt.EventQueue$3.run(EventQueue.java:694) 
    at java.awt.EventQueue$3.run(EventQueue.java:692) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703) 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) 
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) 
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) 
+0

放需要的jar在類路徑 – Sanjeev

+0

你可以在這裏添加您的代碼?除非我們能爲您提供什麼幫助?只有日誌不能提供更多信息。看來你缺少導入jar。 –

+0

底部面板 - > java問題。 – rpax

回答

0
Unresolved compilation problems 

意味着兩件事情可以去錯在Eclipse:

1)src目錄沒有被標記爲源文件夾

轉到項目>屬性> Java構建路徑>來源並添加源 文件夾

2)你必須從你的項目,要麼是不存在的項目或不在你的classpath中引用的一些jar文件。

轉到項目>屬性> Java構建路徑>庫和添加的jar 文件(如果你有罐子)

+0

非常感謝我已經按照你的說法添加了它們,但它似乎還沒有解決,你能否看到屏幕截圖。 http://postimg.org/image/vc15wlubx/ – user3653683

+0

我沒有看到任何新帖子 – Hirak

+0

對不起,看到鏈接http://postimg.org/image/arlyo6r4n/和http://postimg.org/image/vc15wlubx/919cab8a/ – user3653683