File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Property Files (placement of the file in the environment)

 
Dale DeMott
Ranch Hand
Posts: 515
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking to place my property file in my environment. Where should this be placed? How do I know where this class is looking for the properties file? Can someone help??
Dale

------------------
By failing to prepare, you are preparing to fail.
Benjamin Franklin (1706 - 1790)
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Properties are treated as files, and so are discovered relative to the CODEBASE, i,e., wherever in the file system the executing class is.
What I usually do is bundle all my classes into a JAR file, and then put the properties file wherever I care to in the directory structure of the jar. You can also use the -jar option for the VM to "execute" the archive.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Deepak Mahbubani
Ranch Hand
Posts: 68
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dale DeMott:
I'm looking to place my property file in my environment. Where should this be placed? How do I know where this class is looking for the properties file? Can someone help??
Dale


You can place the properties file anywhere in the classpath.
 
Dale DeMott
Ranch Hand
Posts: 515
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
------------------
By failing to prepare, you are preparing to fail.
Benjamin Franklin (1706 - 1790)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic