IDEA最全图标详解 您所在的位置:网站首页 word文档图标长什么样子图片 IDEA最全图标详解

IDEA最全图标详解

2024-07-03 07:40| 来源: 网络整理| 查看: 265

Resources Root:

​ 该类文件夹用于存放你的应用中需要用到的资源文件(如:图片、xml或者properties配置文件等)。

​ 在构建过程中,resource文件夹中的内容均会按照原文件的样子被复制到输出文件夹。和source文件夹一样,你可以定制你的resource文件夹的结构。你也可以指定你的resource文件夹中的文件被拷贝到输出文件的那个文件夹中。

​ PS:默认情况下,工程编译后,resource中的文件和文件夹会被放置在源码编译后的相同的文件夹中,所以如果在源码中以相对路径读取resource中的配置文件时,可认为src中的java文件夹和resource为同一个根目录。

Resource Files

Resources include properties files, images, DTDs, and XML files. These files are located in the classpath of your application, and are usually loaded from the classpath using the following methods:

ResourceBundle.getBundle() for properties 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:

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

The pattern of recognized resource files can be configured as a regular expression in theCompiler dialog (Settings/Preferences Ctrl+Alt+S | Build, Execution, Deployment | Compiler). Using the Resource Patterns field, you can add your own file extensions and create custom list of resources.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有