Java errors building tmwa-server-test

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
Frost
TMW Adviser
TMW Adviser
Posts: 851
Joined: 09 Sep 2010, 07:20
Location: California, USA

Java errors building tmwa-server-test

Post by Frost » 15 Jul 2011, 17:36

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.
You earn respect by how you live, not by what you demand.
-unknown
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Java errors building tmwa-server-test

Post by Jaxad0127 » 16 Jul 2011, 03:30

Please use Java 1.5 or later.
Image
User avatar
o11c
Knight
Knight
Posts: 2262
Joined: 20 Feb 2011, 22:09
Location: ^ ^

Re: Java errors building tmwa-server-test

Post by o11c » 18 Jul 2011, 07:10

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.
Former programmer for the TMWA server.
Post Reply