• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

max line length for a .properties file

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Spring and properties file. But I don't think this is a specific spring question so I choose to post it here --- what's the max line length allowed in a .properties file. I have a xyz.properties file. Some lines have about 220 characters. it works fine. Do you know if there is a max line length for such file ?

 
Marshal
Posts: 27367
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There isn't one. Otherwise the part of the documentation which explains the contents of the file in excruciating detail would mention it.

Actually I didn't check the documentation before I typed that, but I'm sure it's true. It isn't in the nature of Java to have arbitrary restrictions like that. Each line is read into a String and there's no arbitrary limit on the length of a String, so there you go. In other languages you might be reading data into some kind of fixed-length string thing, but Java doesn't really have fixed-length string things.
 
Sheriff
Posts: 22682
128
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is obviously the Integer.MAX_VALUE limit, but after checking the source code I didn't see any other limit.
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic