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: Thu Sep 09, 2010 7:20 am
Location: California, USA

Java errors building tmwa-server-test

Post by Frost » Fri Jul 15, 2011 5:36 pm

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: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Java errors building tmwa-server-test

Post by Jaxad0127 » Sat Jul 16, 2011 3:30 am

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

Re: Java errors building tmwa-server-test

Post by o11c » Mon Jul 18, 2011 7:10 am

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