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 7497473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:06:58+00:00 2026-05-29T19:06:58+00:00

In Java I tried to write a String as an output to the console.

  • 0

In Java I tried to write a String as an output to the console. The length of the String is 20166 characters. After printing the string to the console only second half of the String appears.

The whole string is one long line:

What it looks like:
From the beginning there is a lot of whitespaces (which are supposed to be alphanumeric characters) and after that there is the rest of the string displayed properly.

I tried to change console encoding from default to UTF-16 and UTF-8, but it didn’t help.

The String I am trying to output is text content crawled from a specific webpage (http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery). If I crawl a different webpage there is no problem.

How I process the string:
I use a webservice to get the text content from the webpage. The returned String (text contet) is printed properly (whole). I need to process this string so I change all characters to lowercase and replace all multiple whitespaces with the single one.

textContent.toLowerCase().replaceAll("\\s+", " ");

After lowercasing the characters I am still able to print whole string properly, but after replacing the multiple whitespaces with one, the beginning of string is not visible.

Do you have any idea what the problem is?

Thakns in advance for any help.

  • 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-05-29T19:07:00+00:00Added an answer on May 29, 2026 at 7:07 pm

    What are the preferences for the console? Especially check the settings “Fixed width console” plus “Limit console output”. Maybe your console simply can’t hold that many characters in one line.

    In Eclipse if you go to preference and in the drop-down, you can see RUN/DEBUG option if you click on that RUN/DEBUG drop-down you can see the console button and there you can adjust the “Fixed width console” plus “Limit console output”

    [EDIT] Now Eclipse eventually has to cut the data in the console since it doesn’t have infinite amounts of memory. If the console is still cut off, you can use this trick: Open the “Run Configurations” dialog (Found in the drop down menu for the green “run” button).

    The tab “Common” tab has options in the “Standard Input and Output” group at the bottom to save a copy of all output in a file. You can then use your OSs tools to examine this file.

    Also note that very long lines can make Eclipse slow (i.e. it can hang for a couple of seconds). This is due to a bug in the regexp matching patterns for Exception stack traces. If that happens, limit the line length to 1000 characters or less.

    This is especially a problem with Spring which sometimes creates exceptions that have 50’000 characters in the message.

    If you have a similar problem with the CDT Global Build Console, see here: Eclipse CDT Build Console output not displaying entire compiler output

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

Sidebar

Related Questions

I have tried    to display two spaces in a standard output Java String.
Has anyone tried automatic Java to C++ conversion for speed improvements? Is it a
I've seen some code such as: out.println(print something); I tried import java.lang.System; but it's
I tried decompiling a Java application to which I do not have the source
I tried writing a program in Java using regex to match a pattern and
I have tried several ways to login to a website through java. I have
I am new to java and jboss I tried these commands on my Centos5.4
I've written a Java applet . A user reports that he tried to run
Is there an equivalent to the Java File method isDirectory() in MFC? I tried
How do I securely delete files in java? I tried the code at javafaq.nu

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.