?
Solved

.properties file creation

Posted on 2011-03-15
6
Medium Priority
?
1,806 Views
Last Modified: 2012-06-21
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
Comment
Question by:gbcbr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 35140910
A properties file is just a text file, so if there's no special option, it probably won't matter
0
 

Author Comment

by:gbcbr
ID: 35140960
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
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 35141019
as per i know in jdevelpoer only xml file have not property file
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:gbcbr
ID: 35141031
This what I'm found only.
So, in which directory to place externally created file?
0
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 35142715
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
 
LVL 2

Assisted Solution

by:calboronster
calboronster earned 400 total points
ID: 35146393
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question