Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8866591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:49:33+00:00 2026-06-14T16:49:33+00:00

I currently work on Eclipse Juno 4.2 (but problem is connected with older versions

  • 0

I currently work on Eclipse Juno 4.2 (but problem is connected with older versions of eclipse as well) and I found an irritating issue. When we try to create new class with a default formatter settings, eclipse put an empty line at the end of file.

enter image description here

I tried to figure out by myself how to remove this annoying line and search in formatter options. I found option that could help solve my problem but i found it’s disable by default.

enter image description here

My question is: How to get rid of this line?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:49:35+00:00Added an answer on June 14, 2026 at 4:49 pm

    It’s not really an empty line. It just appears that way in Eclipse.

    When you see the blank line in Eclipse, it means that the last line of the file is terminated by a new line character. That is, the last characters in your Java file are probably }\n (on *nix, with LF line endings) or }\r\n (CRLF line endings on Windows), followed in each case by the end of the file.

    You can prove this to yourself using tail or cat on *nix. If the prompt appears on the same line as the last line of code, then there’s no trailing new line. If the prompt appears on a separate line, then there is a trailing new line character. If there’s a blank line before the prompt, then there’s an empty line in the file.

    If the above doesn’t convince you, use a hex editor. :o) An empty line would appear as two consecutive line endings: \n\n or \r\n\r\n (on *nix and windows respectively).

    There’s nothing wrong with the last line of your file having a new line character at the end. In fact, it’s a good idea to leave it there, because some tools will warn if it’s not there. These tools include Checkstyle (there’s an Eclipse Checkstyle plugin) and diff.

    Eclipse allows you to put the cursor there in case you want to add new content to the end of the file. (This isn’t often needed in Java, because most people don’t put more than one top-level type in a file.)

    Best just to leave it there, and get used to Eclipse showing it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently work with both Visual Studio, Eclipse/Rad, and Vim heavily. Visual Studio and
I'm currently learning how eclipse plugins work. I want to get a table into
Our development team uses Eclipse + Aptana to do their web development work. Currently,
I'm currently experiencing a problem with 'hot code replace' not working on Eclipse Galileo
I'm currently in college, and we work in groups of three to create small
We're developing an Eclipse-based RCP. Recently we've updated to Eclipse Juno and currently we
Every time I try to export an APK from Eclipse (tried Juno and Indigo)
I currently work on a tracking project using a GPS receiver and a modem
I currently work on a parser. I walk a tree, most of it being
I currently work on a magento webshop, which loads PrototypeJS as framework. However i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.