473,408 Members | 1,955 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,408 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 2057

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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.