summaryrefslogtreecommitdiff
path: root/tools/tmwcon/src/Converter.java
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-06-19 14:08:55 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-06-19 14:19:55 -0700
commita185fab9ff741a8f1da3eb8cc2aef6860338e986 (patch)
tree9b2eefa5785696de2435c8afb60a2ba8a5bad22b /tools/tmwcon/src/Converter.java
parentee0ef0d8ce591a0c364f4f53130eb9581118d4cc (diff)
downloadserverdata-a185fab9ff741a8f1da3eb8cc2aef6860338e986.tar.gz
serverdata-a185fab9ff741a8f1da3eb8cc2aef6860338e986.tar.bz2
serverdata-a185fab9ff741a8f1da3eb8cc2aef6860338e986.tar.xz
serverdata-a185fab9ff741a8f1da3eb8cc2aef6860338e986.zip
Make converter nicer
Diffstat (limited to 'tools/tmwcon/src/Converter.java')
-rw-r--r--tools/tmwcon/src/Converter.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/tools/tmwcon/src/Converter.java b/tools/tmwcon/src/Converter.java
deleted file mode 100644
index 0f245aa3..00000000
--- a/tools/tmwcon/src/Converter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * TMWServ to eAthena Converter (c) 2008 Jared Adams
- * License: GPL, v2 or later
- */
-
-import java.io.*;
-import java.lang.reflect.*;
-import java.net.*;
-import java.util.*;
-
-public abstract class Converter {
- static String[] tiledJars = {"tiled-core.jar", "tiled.jar"};
- static String[] wlkJars = {"plugins/tmw.jar", "tmw.jar"};
-
- public static void main(String[] args) throws Exception {
- List<URL> urls = new ArrayList<URL>();
-
- File tiled = null;
- for (String s : tiledJars) {
- tiled = new File(s);
- if (tiled.exists()) break;
- }
- if (tiled == null || !tiled.exists()) {
- System.err.println("Unable to find a Tiled jar file! Exiting.");
- System.exit(-5);
- }
- urls.add(tiled.toURI().toURL());
-
- File wlkWriter = null;
- for (String s : wlkJars) {
- wlkWriter = new File(s);
- if (wlkWriter.exists()) break;
- }
- if (wlkWriter == null || !wlkWriter.exists()) {
- System.err.println("Unable to find the tmw plugin for Tiled! No wlk files will be made!");
- } else {
- urls.add(wlkWriter.toURI().toURL());
- }
-
- File self = new File("converter.jar");
- if (!self.exists()) {
- System.err.println("Unable to find a the converter jar! Exiting.");
- System.exit(-5);
- }
- urls.add(self.toURI().toURL());
-
- URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[0]));
- Class c = loader.loadClass("converter.Main");
- Method m = c.getMethod("run", String[].class, Integer.TYPE);
- System.out.println("Starting");
-
- m.invoke(null, args, 0);
- }
-}