aspose 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.
 
jQuery in Action, 2nd edition
 
subject: need help regarding property file