FIX: Large String Literals Can Cause Compiler ErrorsLast reviewed: January 22, 1998Article ID: Q156921 |
The information in this article applies to:
SYMPTOMSThe Microsoft Java Compiler (JVC) generates various compiler errors when a string literal exceeds 1000 characters on one line.
WORKAROUNDYou can avoid having string literals that exceed 1000 characters by breaking your string literal into multiple lines and using the + (plus sign) operator to combine the strings.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in Visual J++ 1.1.
MORE INFORMATION
Steps to Reproduce BehaviorThe following sample code generates one or more of the following errors:
test.java(2162720,1071) : error J0010: Syntax error test.java(2162720,1072) : error J0014: Expected ')' test.java(2359392,0) : error J0029: Invalid character test.java(2752554,2752554) : fatal error J0001: Internal Compiler Error // test.java void test { public static void main(String args[]) { System.out.println("*****************************************************************************************... for about 1500 characters"); }}
// workaround.java void workaround { public static void main(String args[]) { System.out.println("****************************************"+ "********************************************************"+ "**************************... for about 1500 characters"); }}
REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/ http://support.microsoft.com/support/java/ Keywords : CmdLnUtils Technology : kbInetDev Version : 1.0 Platform : WINDOWS Issue type : kbbug Solution Type : kbfix |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |