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
  • 54,432
  • 29
  • 203
  • 199
Marc H
  • 1,228
  • 3
  • 18
  • 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
  • 389,263
  • 172
  • 990
  • 904
  • 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