Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.util.properties  RSS feed

 
Neel Chow
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to load a property file for databases.
One of the key value pair is
site.master.kdemo.url=jdbc:inetdae7:localhost:1433?database=kdemo
For some reason when I load this I see only
site.master.kdemo.url=jdbc:inetdae7:localhost:1433?database...
Is there any limit of how many characters a value should be.
How to eliminate this problem
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no limit to the length of a property. I thought the equal sign between database and kdemo would be clipped by the Property parser but i tested an example on Win2k with JDK 1.5.0 and it behaved properly (interpreted a second equals sign on a line as part of the property value):

<test.properties>
property2=01234=56789
property3=fdsa\=asdf

<program output>
name = property2 value = 01234=56789
name = property3 value = fdsa=asdf

Try replacing the equals sign "=" with the escaped version "\=" and see if it makes a difference on your platform.
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you seeing that print out? The fact that there is an ellipsis on the end (...) makes me suspect that whatever is displaying the value is doing the chopping just for display purposes and that your value is the full value.
 
Neel Chow
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi david
i think you are right.
I am getting the full value in my code.
thanks
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!