Unnamed patch
authoradam <adam@megacz.com>
Thu, 24 Mar 2005 07:41:42 +0000 (07:41 +0000)
committeradam <adam@megacz.com>
Thu, 24 Mar 2005 07:41:42 +0000 (07:41 +0000)
darcs-hash:20050324074142-5007d-af4d8ea30f799ee863c81040f9467b5af1e1737b.gz

src/org/ibex/jinetd/Main.java
src/org/ibex/jinetd/TreeClassLoader.java
src/org/ibex/jinetd/Watcher.java

index 8e4c41b..037527e 100644 (file)
@@ -18,7 +18,7 @@ public class Main {
     public static PrintStream LOGSTREAM;
     public static String defaultDomain;
 
-    static {
+    public static void init() {
         try {
             System.err.println("jinetd starting...");
             ROOT = System.getProperty("jinetd.root", null);
@@ -70,6 +70,7 @@ public class Main {
     }
 
     public static void main(String[] s) throws Exception {
+        init();
         Root root = new Root(ROOT);
         while(true) try {
             if (root != null) { root.scan(); return; }
index d7b4f5e..20d2d84 100644 (file)
@@ -19,6 +19,7 @@ public class TreeClassLoader extends URLClassLoader {
 
     public TreeClassLoader(File root, ClassLoader parent) {
         super(new URL[] { }, parent);
+       System.out.println("TreeClassLoader("+root.getAbsolutePath()+")");
         this.root = root;
         this.lib = new File(root.getAbsolutePath() + File.separatorChar + "lib");
     }
index 980f864..265073c 100644 (file)
@@ -16,7 +16,7 @@ public abstract class Watcher extends File {
     private Vec watched = new Vec();
 
     public void watch(File f) { watched.addElement(new Watched(f.getAbsolutePath())); }
-    public void watch(String s) { watch(getAbsolutePath() + File.separatorChar + s); }
+    public void watch(String s) { watch(new File(getAbsolutePath() + File.separatorChar + s)); }
 
     public void scan() throws IOException {
         for(int i=watched.size()-1; i>=0; i--)