This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with loading properties from deployment.properties

 
Sugantha Jeevankumar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application in which various properties like Xms and Xmx values are set while the user logs in. The file <User's HOME>/Application Data/Sun/Java/Deployment/deployment.properties is loaded into a Properties object and the values are set from there ..



For some reason, the value for key, "deployment.javapi.jre.1.5.0_11.args" (line #:4) is always returned as null. When I check the properties file it does contain a value for the corresponding key. Is there any reason why this does not work. Any suggestions are welcome. Thanks in advance.

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the underscore character generally work as a property name?
 
Sugantha Jeevankumar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. Normally, "." is used to separate words in a property's key. I changed them to underscores in a sample file and it works fine.

I am just thinking.. Can this be an issue with multiple JREs being present in a system and the application having trouble reading the JRE parameters of a specific version of JRE. I am not sure. Any pointers or suggestions are appreciated. Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic