The documentation indicates that if there are several .properties files in the same folder differing by globalization encodings IntelliJ "automatically" recognizes these as a resource bundle. The examples show how to get properties from a resource bundle. What if I only have one property file and Intellij has not identified it as a resource bundle. How do I access those properties? Also is there any specific location that I need to put the .properties file in? I am assuming that this is a manual process initially creating the property file and filling it with content?
The documentation indicates that if there are several .properties files in the same folder differing by globalization encodings IntelliJ "automatically" recognizes these as a resource bundle. The examples show how to get properties from a resource bundle. What if I only have one property file and Intellij has not identified it as a resource bundle.
Then the ide doesn't show a resource bundle editor and you work with a single *.properties file
How do I access those properties?
Are you asking about java code which is used to read/write property values?
Also is there any specific location that I need to put the .properties file in?
I see "content root" but not source root. Is source root the folder where the main class is?
As far as the artifact setup. To select a .Jar artifact you masically only have the options to "Create from modules with dependencies". Then I have been told that since this is a Maven project I have to select "Copy to output directory and link with manifest". So that is how the artifact is setup. Now will the .properties be included in the ..jar?
I see "content root" but not source root. Is source root the folder where the main class is?
It's a 'blue folder' under content root, check the reference page I provided earlier.
As far as the artifact setup. To select a .Jar artifact you masically only have the options to "Create from modules with dependencies". Then I have been told that since this is a Maven project I have to select "Copy to output directory and link with manifest". So that is how the artifact is setup. Now will the .properties be included in the ..jar?
All module resources which are located under a source root will be included to the artifact then
Hi Kevin,
Please check the properties support.
Denis
The documentation indicates that if there are several .properties files in the same folder differing by globalization encodings IntelliJ "automatically" recognizes these as a resource bundle. The examples show how to get properties from a resource bundle. What if I only have one property file and Intellij has not identified it as a resource bundle. How do I access those properties? Also is there any specific location that I need to put the .properties file in? I am assuming that this is a manual process initially creating the property file and filling it with content?
Then the ide doesn't show a resource bundle editor and you work with a single *.properties file
Are you asking about java code which is used to read/write property values?
It just needs to be located under a source root.
Yes
I just add a file with the .properties suffix? Any particular folder? Will it be include in the artifact (.jar)?
Yes
Please see my comment about source root above
It depends on your artifact setup
Denis
I see "content root" but not source root. Is source root the folder where the main class is?
As far as the artifact setup. To select a .Jar artifact you masically only have the options to "Create from modules with dependencies". Then I have been told that since this is a Maven project I have to select "Copy to output directory and link with manifest". So that is how the artifact is setup. Now will the .properties be included in the ..jar?
It's a 'blue folder' under content root, check the reference page I provided earlier.
All module resources which are located under a source root will be included to the artifact then
Denis