プロジェクトの私のビルド フォルダーは、次の構造を持っています。
build
|-classes
|package
|-HelloWorld.class
|-resources
|-images
|-image.png
HelloWorld クラスには ImageIcon オブジェクトがあり、その宣言は次のようになります。
ImageIcon icon = new ImageIcon(HelloWorld.class.getResource("../../resources/images/picture.png"));
しかし、それはメソッドをスローNullPointerException
しgetResource()
ます。どこで間違いを犯したのですか?