File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

location of .properties file?

 
Michael Valentino
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just about ready to submit my project. Only concern really burning in my mind now is the location of the .properties file for the program. Ideally, if it were up to me, I'd just package it in the scjda-XXXXXXXX jar file and have it install when that jar is unpacked. However, that's a violation of the packaging spec. So what I've done was include it in the runme.jar, and in the installation section of the users guide, state that a "resources" folder has to be extracted from runme.jar first, before the application can run.
Is this acceptable? It doesn't sound like a good practice, but given the specs it doesn't seem like too many other options are available.
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael,

I guess, your application needs a properties file before it can start up. Is it right? If your answer is yes, then it is wrong - I have read in this forum that someone got failed for this.

Your project should create a properties file at the current working directory, when there is no properties file could be found.

Hope this helps.

Regards,

Muthaiah.
 
Michael Valentino
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That actually does help a lot. Makes sense too. I didn't see anything mentioned in the spec about where the .properties file was supposed to be put.

Now that I think about it, the same thing is crossing my mind for the .db file. In my development environment, I have the .db file in a folder called resources, and on installation, I have the user extract that folder from the runme.jar. Is this also incorrect? Sounds like I should probably rethink the file system architecture of my project before submiting
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Actually you should NOT extract (or expect anyone to extract ) the runme.jar at all for anything. I have the image files and the help (html) files in the runme.jar, but I access them through the program.
2. My instructions demand that the .db file should be placed in the root directory, which I have named as 'project' and this directory should be jarred as scjda-XXXXXXXXX.jar.
3. The assesor should only extract scjda-XXXXXXXXX.jar.
4. The directory structure should be like

/project/runme.jar
/project/version.txt
/project/readme.txt -->not necessary, but I have it!
/project/xx.db
/project/code/--> all the source codes
/project/docs/choices.txt
/project/docs/javadoc/ --> the javadoc created
/project/instrctions.html given by sun.

Hope this helps.

Regards,

Muthaiah.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic