Problems compiling with jikes (escaping backslash)

From: Brook, James (JBroo..HELLO.com)
Date: Wed Jun 04 2003 - 06:20:22 EDT

  • Next message: Christian Gruber: "RE: JavaOne or WWDC"

    I am using Project Wonder style ant builds to build my suite of WebObjects
    applications on Mac OS X.

    Whenever I try to escape a backslash in a String, I get compiler errors.

    For example the line:

            int i = aString.lastIndexOf("\\");

    causes this error:

            Lexical: String constant not properly terminated.
            Lexical: illegal token.
            ...and various subsequent errors.

    I have searched all over the web and various lists and can find no
    explanation. I can escape other characters (eg. \n, or unicode escapes).

    The code compiles fine when I use javac. Has anyone else seen this?

    James Brook



    This archive was generated by hypermail 2.0.0 : Wed Jun 04 2003 - 06:23:26 EDT