6

I am working on a Java project that requires the use of several images. I'm on ubuntu linux So I have an images folder inside my src directory. So far so good but try as I might I can't seem to find a way to load or import image files into that images folder. ( I want to be able to simply go something like loadImage("images/imageToLoad.png"); )

I have tried to just drag and drop. I know that I could of course leave the program and use the linux filesystem to transfer the images but that's a pain and defeats the purpose of an IDE.

ROMANIA_engineer
  • 51,252
  • 26
  • 196
  • 186
Marc H
  • 1,198
  • 3
  • 17
  • 29

1 Answers1

4

You will have to do it in a file manager, outside of IntelliJ IDEA. To ensure that images are available in the application classpath check Settings | Compiler | Resource Patterns, .png extension needs to be listed there.

CrazyCoder
  • 371,688
  • 155
  • 943
  • 850
  • 4
    This is crazy as other IDEs (as Eclipse) can do an import from the file system. Why is that so that IntelliJ cannot do a simple import of a file? – Pille Jun 24 '15 at 16:46