473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

having problem loading a property file

112 100+
I am having trouble loading a property file and keep getting this error when running my shell script that loads and runs my jar files, etc:

no property file loaded, using defaults... (java.io.FileNotFoundException: /home/dedhia/.jftp/jftp.properties (No such file or directory))



Here is my java code in which I get the property file:
Expand|Select|Wrap|Line Numbers
  1.         String propertyFile = System.getProperty("Outlier.PropertyFile","OutlierReportGenerator1.PROPERTIES");
  2.         System.out.println(propertyFile);
  3. //Location of property file
  4.         properties = new File(File.separator + "home" + File.separator + "dedhia" + File.separator + "OutlierReportGenerator" + File.separator + "classes" + File.separator + propertyFile);
  5.         System.out.println(properties);
  6.         BufferedReader BR = new BufferedReader(new FileReader(properties));
  7.         System.out.println("I got to this pt");
  8.         String line = BR.readLine();
  9.  
Here is the shell script where I run my program:
Expand|Select|Wrap|Line Numbers
  1. /usr/local/jdk1.6.0_11/bin/java -Dreports="true" -Dmail="true" -Dconnect="true" -Dccserv="true" -DOutlier.PropertyFile=OutlierReportGenerator1.properties -cl
  2. asspath /home/dedhia/OutlierReportGenerator/classes:/home/dedhia/OutlierReportGenerator/classes/jftp.jar:/home/dedhia/OutlierReportGenerator/classes/jxl.jar:
  3. /home/dedhia/OutlierReportGenerator/classes/produtil.jar:/home/dedhia/OutlierReportGenerator/classes/activation.jar:/home/dedhia/OutlierReportGenerator/class
  4. es/mail.jar:/home/dedhia/OutlierReportGenerator/classes/classes12.zip:/home/dedhia/OutlierReportGenerator/classes/OutlierReportGenerator.jar ReportGenerator
  5.  
The OutlierReportGenerator.jar is the jar that I am exporting from eclipse, which contains all of my java code. Report Generator is the class in which main is at.

Am I doing something incorrect in the way that I am loading my property file because I have tried a few different things but seem to get the same error over and over again.

Thanks for the help!!!
Jan 8 '10 #1
0 2056

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Joe | last post by:
Hi Does anyone know of any issues about loading config files for windows forms applications? I have an application that utilizes a config file that holds my database connection string as well...
10
by: Randy Webb | last post by:
This page: http://www.hikksworld.com/loadJSFiles/ Is one where I was testing the ability of browsers that can/can't dynamically load a JS file with one of the three methods: 1)Changing the src...
5
by: Nick Malik | last post by:
reposting to a wider audience "Nick Malik" <nickmalik@hotmail.nospam.com> wrote in message news:WYONc.203854$XM6.119642@attbi_s53... > My turn to ask a question > > I am working on a plug-in...
2
by: Foehammer | last post by:
Hello, I'm trying to load an assembly dynamically using an app domain. This is a proof-of-concept for a larger project, so please excuse the lame class names. TestLib is the dll where all the...
3
by: Roy Wang | last post by:
hi, My problem is how to determining when the XML file has loaded using javascript. I loaded an xml file using javascript in a web page. The code below is loading the xml file for IE:...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
4
by: Mike | last post by:
I have declared two classes. The first class has 4 private variables. Each has a property defined. I'm calling a readfile sub from a second class. The second class also has an Arraylist...
2
by: www.gerardvignes.com | last post by:
I am using this to load the client JavaScript for a web application when it is selected by the user) via an Ajax connection to the server. I have found only two ways of loading new JavaScript...
3
by: suresh_nsnguys | last post by:
Respected sir/madam, right now i am displaying movie (.wmv) file using <embed> and <object> tags inside <div> tag. Everything is working fine. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.