簡體   English   中英

從 Github 將帶有圖像的項目克隆到 Netbeans 時出錯

[英]Error to clone a project from Github with images to Netbeans

每次我嘗試將帶有圖像的項目從 GitHub 克隆到 Netbeans 時,當我嘗試運行時都會向我顯示如下錯誤:

https://hastebin.com/bexokemalo.bash

我做了什么?

Netbeans 克隆

網豆打開

NetBeans 項目

這段代碼沒有錯誤,完整代碼在github上: https : //github.com/dotrz/img

具有 NPE (NullPointerExecption) 的行位於otrz/otrzJFrame.java#initComponents()

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imgs/test.png"))); // NOI18N

嘗試分解該行以檢查:

  • jLabel1不為空
  • getClass().getResource("/imgs/test.png")不為空

暫無
暫無

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

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