File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes need help regarding property file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "need help regarding property file" Watch "need help regarding property file" New topic
Author

need help regarding property file

nitude gupta
Ranch Hand

Joined: Sep 04, 2008
Posts: 34
Hi DERE!!
I am writing a Java code in which I am trying to use property file where I have defined connection details and few constants

here is my code


CheckListReportComponent.java
########################

connection.properties
########################


when I use strURL or strUser etc in getMyConnection() function I start getting err "Driver not Found!!!"
where as when I prnt these properties in main...using SOP I m able to do that..
Please suggest where I m missing n why these property are not available inside other functions

TIA......


David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

properties in the files shouldn't have quotes around them
eg
nitude gupta
Ranch Hand

Joined: Sep 04, 2008
Posts: 34
hey Thanks for the prompt reply...It worked!!!
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You're welcome. Thanks for the feedback.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help regarding property file
 
Similar Threads
Help with Chat software
JDBC connection for DB2 database
please help me to sove the GZIP exception
how to read config file from other mahine using java
Not able to execute after sucessfull compilation