Results 1 to 3 of 3

Thread: lineseparator doesnot separate the line while writing the file in unix environment

  1. #1
    Join Date
    May 2010
    Posts
    3

    Default lineseparator doesnot separate the line while writing the file in unix environment

    I am writing one text file using FlatFileItemWriter class.
    File is generated but it doesnot separate the data with new line character in Unix environment.

    I have not configured the lineSeparator in xml, so by default It should take system line separator.

    FlatFileItemWriter generating file with new line character in windows environment but it generates file in one line only with square character instead of new line in unix environment.

    Please suggest asap that what should be the issue

  2. #2
    Join Date
    Jun 2005
    Posts
    4,231

    Default

    It works for me (and everyone else I think) so maybe there is some weirdness about the way your JRE is installed? Anyway you can override the default line separator by injecting a new value into the writer.

  3. #3
    Join Date
    May 2010
    Posts
    3

    Default

    Thanks. I did the same thing.
    Issue is that text file is created in unix environment and I tried to access that created file in IE at windows platform.In windows, /n is not recognized so it read as garbage character and square box is displayed in text file.
    so I override lineseparator in xml so now it showing proper.

    Again thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •