?
Solved

config file

Posted on 2006-05-19
5
Medium Priority
?
242 Views
Last Modified: 2010-03-31
Hi,

I'm using Netbeans and everytime i build/clean, it wipes out my myprogram\/dist directory.
Wheres a good place to store my config.txt so that my properties can read it.
I put it in myprogram\conf

i,e ..\\conf\\config.txt

says file not found.
0
Comment
Question by:jedistar
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:hoomanv
ID: 16723892
post the code where you store and where you read that file;
0
 

Author Comment

by:jedistar
ID: 16723901
Properties props = new Properties();
FileInputStream in = new FileInputStream("config.txt");
props.load(in);
..

the file is stored in my application\dist folder.
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 1000 total points
ID: 16723910
so as you said that config.txt is in conf
FileInputStream in = new FileInputStream("conf/config.txt");

also do the same for writting
0
 

Author Comment

by:jedistar
ID: 16723919
thanks.
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 16723922
:)
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month17 days, 1 hour left to enroll

864 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