簡體   English   中英

為什么Eclipse無法從lib文件夾檢測到jar文件

[英]why eclipse not detect the jar file from lib folder

我正在嘗試使用Eclipse和在項目中使用一些外部jar文件來開發Java桌面應用程序。

我已經將所有jar文件放在/lib文件夾中(這是桌面應用程序,因此這里/WEB-INF不存在),現在的問題是該應用程序無法檢測到外部jar文件是什么問題? 以及如何解決這個問題?

您需要將外部jar文件添加為:-

  Click Properties > Java Build Path > Libraries.
    Click Add External Jars and browse to the JAR file that contains the look and feel, then click OK. 
Now, you are ready to apply the new Look and Feel to your application.

您也已將其添加到classpath中。 右鍵單擊項目,然后單擊添加以構建項目。 單擊庫選項卡,然后單擊外部jar文件。 選擇您的jar文件。 它將被添加到classpath中。

我認為您必須插入它。 右鍵單擊項目屬性構建路徑,向其添加外部jar和瀏覽器。

只需將jar文件放入libs文件夾並abb即可構建路徑。 更新的eclipse不能從lib獲取jar或配置文件,而從libs文件夾獲取jar文件。

您可以右鍵單擊jar文件,然后選擇“ Build Path ,然后選擇“ add to build path

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM