IntelliJ IDEA 14.0.0 Web Help

Resource Files

Resources include properties files, images, DTDs, and XML files. These files are located under the Classpath of your application, and are usually loaded from the Classpath by means of the following methods:

  • ResourceBundle.getBundle() for the property files and resource bundles
  • loadResourceAsStream() for icons and other files

When building an application, IntelliJ IDEA copies all resources into the output directory, preserving the directory structure of the resources, relative to the source path. The following file types are recognized as resources by default:

  • .properties
  • .xml
  • .html
  • .dtd
  • .tld
  • .gif
  • .png
  • .jpeg
  • .jpg

The pattern of recognized resource files is represented as a regular expression and configurable in the Compiler dialog.

Using Resource pattern setting, you can add your own file extensions and create custom list of resources.

See Also

Concepts:

Reference:

Web Resources:

Last modified: 12 November 2014
comments powered by Disqus