I am following the cPath Administrator Guide in installing cPath and I
have having problems at step 7: Compile code. When I follow the
instructions I get these errors:
------------------------------------------------
compile:
[javac] Compiling 276 source files to C:\Documents and Settings
\fchan\My Doc
uments\Project\cPath\build\WEB-INF\classes
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:144: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] Enumeration enum = request.getHeaderNames();
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:145: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] while (enum.hasMoreElements()) {
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:146: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] String headerName = (String)
enum.nextElement();
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:202: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] Enumeration enum =
session.getAttributeNames();
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:203: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] while (enum.hasMoreElements()) {
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:204: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] String name = (String) enum.nextElement();
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:216: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] Enumeration enum =
servletContext.getAttributeNames();
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:217: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] while (enum.hasMoreElements()) {
[javac] ^
[javac] C:\Documents and Settings\fchan\My Documents\Project\cPath
\src\org\m
skcc\pathdb\xdebug\SnoopHttp.java:218: as of release 5, 'enum' is a
keyword, and
may not be used as an identifier
[javac] (use -source 1.4 or lower to use 'enum' as an identifier)
[javac] String name = (String) enum.nextElement();
[javac] ^
[javac] 9 errors
BUILD FAILED
C:\Documents and Settings\fchan\My Documents\Project\cPath\build.xml:
98: Compile
failed; see the compiler error output for details.
-------------------------------
I am currently using Java 6 and It seems that on Java version 5 and
higher the word enum is a keyword and can't be used as a variable
anymore.
Has anyone else had this problem?