Solved

Error:"constant string too long",

Posted on 2004-04-05
3
2,866 Views
Last Modified: 2007-12-19
Hi all,

I'm trying to process a String that is approx 200,000 characters long. I know this is a huge 'string' but it is actually a representation of a document.

When I try to process this in JAVA I get the error

"java:6: constant string too long".

Is there an 'object' class along the lines of 'int' which is extended to 'long' for the string class?

Any help is much appreciated.
0
Comment
Question by:highlyevolved
  • 2
3 Comments
 
LVL 14

Assisted Solution

by:Tommy Braas
Tommy Braas earned 200 total points
ID: 10761088
The maximum length of a String in Java is 64kb (65535 characters).
0
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 200 total points
ID: 10761092
You should be able to use the StringBuffer class.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10762020
>>(65535 characters).

Wouldn't that be 128kb? That seems a strange size. Where is this defined o?
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now