Skip to content

Commit

Permalink
Make the plugin directory br relative to the current directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUIpsp committed Aug 3, 2011
1 parent b400e50 commit 7922fa7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/GUIpsp/GuiBot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ public class Main {
public static Map classmap = new HashMap();
public static Map cmdmap = new HashMap();
public static Map<String, String> helpmap = new HashMap<String, String>();
static String plugdir = "/home/guipsp/Desktop/GuiBot/plugins/";
static File directory = new File(plugdir);
static File directory = new File("/home/guipsp/Desktop/GuiBot/plugins/");
public static String nick = "GuiBot";
public static GuiBot bot = new GuiBot();
public static void main(String[] args) throws Throwable {
Expand All @@ -31,7 +30,7 @@ public static void reLoad() throws Throwable {
cmdmap.clear();
helpmap.clear();
URL classUrl;
classUrl = new URL("file://" + plugdir);
classUrl = new URL("file://" + directory.getAbsolutePath()+"/");
URL[] classUrls = { classUrl };
URLClassLoader ucl = new URLClassLoader(classUrls);
File files[] = directory.listFiles();
Expand Down

0 comments on commit 7922fa7

Please sign in to comment.