-2

I'm making a pet project with java GUI (netBeans) and while I was using ant, images worked properly. But I changed to maven since I don't know how to do tests work in ant with NetBeans. And the issue that I've encountered now with Maven is that image Icons keep creating this Exception. Image of the Exception

I have this autogenerated code that creates buttons, actionEvents, listeners etc. Image of autogenerated code

As I said, everything worked in ant but in maven it doesn't anymore. I'm using NetBeans. INeither do I understand exactly what to do with pom.xml, nor I know if I should put icons in another folder instead of "E:[...]\LeagueOfPokemon\src\main\java\icons". I don't mind ant or maven, I just want something that allows me to make tests and shows images. If someone knows what should I do please tell me.

Filburt
  • 17,626
  • 12
  • 64
  • 115
  • 1
    Welcome to Stack Overflow, but please don't post images of code or exception messages **ever**! [Edit] your question, please, to include the full exception message and all code relevant to produce a [mcve]. Thanks! – Alexander Leithner Jun 06 '21 at 12:26

1 Answers1

0

Ok the answer is that I can use Maven and keep my icons in "E:...\LeagueOfPokemon\src\main\java\icons". But I needed to insert into the pom.xml the following code:

<build>
    <resources>
        <resource>
            <directory>src/main/java</directory>
        </resource>
    </resources>
</build>