Page 1 of 1

Java errors building tmwa-server-test

Posted: 15 Jul 2011, 16:36
by Frost
Yesterday I updated tA to use the repo at git://gitorious.org/tmw/tmwa-server-test.git. Make fails.

OS is CentOS 5.6 on i386 with ant version 1.6.5 and java 1.4.2 (Redhat's "java-1.4.2-gcj-compat-devel" to be precise.) Until now, I've been using and compiling the server code from git://gitorious.org/tmw-eathena/mainline.git with no problems.

Any ideas?

$ make
ant -f tools/tmwcon/build.xml
Buildfile: tools/tmwcon/build.xml

init:

compile:
[javac] Compiling 3 source files to /home/tmw-test/eathena/tools/tmwcon/build
[javac] ----------
[javac] 1. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Main.java (at line 33)
[javac] public static Collection<File> getTMXFiles(File directory) {
[javac] ^^^^^^^^^^
[javac] The type Collection is not generic; it cannot be parameterized with arguments <File>
[javac] ----------
[javac] 2. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Main.java
[javac] (at line 34)
[javac] if (!directory.isDirectory()) return Collections.emptyList();
[javac] ^^^^^^^^^
[javac] The method emptyList() is undefined for the type Collections
[javac] ----------
[javac] 3. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Main.java (at line 36)
[javac] List<File> ret = new Vector<File>();
[javac] ^^^^
[javac] The type List is not generic; it cannot be parameterized with arguments <File>
[javac] ----------
[javac] 4. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Main.java (at line 36)
[javac] List<File> ret = new Vector<File>();
[javac] ^^^^^^
[javac] The type Vector is not generic; it cannot be parameterized with arguments <File>
[javac] ----------
[javac] 5. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Main.java (at line 40)
[javac] ret.addAll(getTMXFiles(f));
[javac] ^^^^^^^^^^^
[javac] The method getTMXFiles(File) is undefined for the type Main
[javac] ----------
<snip>
[javac] 34. ERROR in /home/tmw-test/eathena/tools/tmwcon/src/converter/Process.java (at line 213)
[javac] public static void writeMasterImport(ArrayList<String> folders) {
[javac] ^^^^^^^^^
[javac] The type ArrayList is not generic; it cannot be parameterized with arguments <String>
[javac] ----------
[javac] 34 problems (34 errors)

BUILD FAILED
/home/tmw-test/eathena/tools/tmwcon/build.xml:16: Compile failed; see the compiler error output for details.

Re: Java errors building tmwa-server-test

Posted: 16 Jul 2011, 02:30
by Jaxad0127
Please use Java 1.5 or later.

Re: Java errors building tmwa-server-test

Posted: 18 Jul 2011, 06:10
by o11c
What I'm surprised by is that a pre-1.5 java even knows about generics - although, on further thought, it's probably actually a newer compiler that just happens to use the old libraries.