• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1878
  • Last Modified:

.properties file creation

Please advice how to create .properties file in JDeveloper.
In NetBeans it's option in New, but in jdev I can't find where is it.
0
gbcbr
Asked:
gbcbr
3 Solutions
 
CEHJCommented:
A properties file is just a text file, so if there's no special option, it probably won't matter
0
 
gbcbrAuthor Commented:
I know this, I just want to create it by IDE, so it will place properly and make visible. Otherwise I have to know in which directory to put it.
I have bad experience with image files, I put them as I understood properly, inside of src directory, but they invisible for IDE.
Maybe it track them in some way.
0
 
Sathish David Kumar NCommented:
as per i know in jdevelpoer only xml file have not property file
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
gbcbrAuthor Commented:
This what I'm found only.
So, in which directory to place externally created file?
0
 
objectsCommented:
depends on how you are loading it. If you are loading it using the classloader then you need to put it in a directory that is in the classpath
If you're loading it directly as a file then you can put it anywhere

I'd suggest creating a directory named say 'resource' and put it in there.
If you want to load then with the classloader then also add that folder to your classpath


0
 
calboronsterCommented:
One of the better and fail-safe ways to manage and control the external file location is
to mention a JVM runtime system parameter (for example user.home). And use this property in your application code (through System.getProperty) to retrieve the absolute path of the file. I use this to retrieve the .properties files in my application.

1. In JVM properties define as :
Java .. -Duser.home=/etc/properties/abc.properties ...

2. In file read location as
String userhome = System.getProperty("user.home");

The basic advantage of this method is that this makes your application and its properties as container independent and easily manageable.
Secondly, the testing of properties requires you to simply alter the value of the property.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now