• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.util.properties

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi david
i think you are right.
I am getting the full value in my code.
thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic