[javacc] Exception in thread "main" java.lang.Error: Invalid escape character at line 1 column 64.
[javacc] at org.javacc.parser.JavaCharStream.readChar(Unknown Source)
C:\users\buddy\workspace\jboss_5_1_0_Beta1\server\build.xml:301: c:\Java\JEE1.5_sdk\jdk\jre\bin\java.exe failed with return code 1
Are you sure you are using the correct JDK? Looks like its being pointed to JDK present in "JEE" SDK. Download the "JDK 5.0 Update 18" from Sun http://java.sun.com/javase/downloads/index_jdk5.jsp and point JAVA_HOME to this new location. See if that fixes the issue.
I found the problem.
The javacc and javac version that I was using was fine ( C://Java/JEE1.5_sdk/jdk//bin/javac.EXE) as its java -version output confirmed
java version "1.5.0_09"
The problem was that I was doing my JBoss AS 5 build from a Cygwin shell. The build works perfectly from the native Windows XP command prompt (BTW XP's default command prompt is the worst CLI I have ever experienced). I also downloaded RedHat Fedora Linux and executed the same build from a Windows XP hosted VM (this time using a *real* Unix bash CLI) and the build also worked perfectly.
Sadly, I need to do work on Windows XP with a reasonable shell (besides Cygwin).
Has anybody out there had success building JBoss AS 5.x on a windows platform using a third-party shell (besides Cygwin)?