RE: Problems compiling with jikes (escaping backslash) - solved

From: Brook, James (JBroo..HELLO.com)
Date: Tue Jun 17 2003 - 12:03:02 EDT

  • Next message: Chuck Hill: "Re: Problem with Classpath files after upgrading to 1.02"

    I went through everything carefully and could not get rid of the problem. I
    created a completely new project on a freshly installed OS X/WebObjects 5.2
    system with the latest dev tools (jikes 1.17). I simply added the line:

            System.out.println("\\");

    to the Application class' constructor. It does not compile with jikes. I
    tried the same on another machine - same result.

    Then I installed the unstable fink version of jikes 1.18 from source. When I
    select jikes as the compiler in the PBX target/compiler settings it still
    does not work.

    However my pure ant build started to work with jikes 1.18 and the JIKES_HOME
    environment variable set to point to the jikes binary.

    I am happy with this outcome, but what is happening here? I have not read
    about anyone else having this problem, which surprises me.

    I would be interested to know if anyone else sees this with jikes 1.17, or
    if it is something that I am doing wrong.

    Regards
    James

    >-----Original Message-----
    >From: Chuck Hill [mailto:chil..lobal-village.net]
    >Sent: 04 June 2003 19:48
    >To: Brook, James; 'woproject-de..bjectstyle.org'
    >Subject: Re: Problems compiling with jikes (escaping backslash)
    >
    >
    >That builds fine for me with jikes 1.15. Check your source carefully.
    >Look very carefully. Have you perhaps typed something like:
    >
    >int i = aString.lastIndexOf('\\");
    >int i = aString.lastIndexOf("\\'');
    >
    >Note '' or ' instead of ". It is easy to miss if you are not
    >looking for it.
    >
    >If you have copied and pasted this line, try deleted them
    >(along with the
    >ones before and after) and retyping them hand. You might have a funny
    >character in there.
    >
    >
    >Chuck
    >
    >
    >
    >At 12:20 PM 04/06/2003 +0200, Brook, James wrote:
    >>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
    >>
    >
    >--
    >
    >Chuck Hill chil..lobal-village.net
    >Global Village Consulting Inc.
    http://www.global-village.net



    This archive was generated by hypermail 2.0.0 : Tue Jun 17 2003 - 12:05:55 EDT