This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem with loading properties from Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with loading properties from" Watch "Problem with loading properties from" New topic

Problem with loading properties from

Sugantha Jeevankumar
Ranch Hand

Joined: Jun 06, 2007
Posts: 93
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/ 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.

SCJP 5.0
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42958
Does the underscore character generally work as a property name?
Sugantha Jeevankumar
Ranch Hand

Joined: Jun 06, 2007
Posts: 93
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.
Have you checked out Aspose?
subject: Problem with loading properties from
It's not a secret anymore!