Folks,

 If I run this script twice I get  the exception listed below. It appears that you can only declare a class once, as the second time you try to declare the same class you get an exception. What is the prefered way to test for the existance of a class before declaring it. What if the class changes between runs? Is there an easy way to unload the class prior to redecaring it?

Thanks,

mike


=====================================================


reloadClasses();


class TestReturn {
        boolean getBoolean() { return true; }
        byte getByte() { return (byte)1; }
        long getLong() { return 42l; }
        float getFloat() { return 1.0f; }
        double getDouble() { return 4.2d; }
        Double getD() { return new Double(4.2d); }
}


tr = new TestReturn();

parser.writeError(tr.getLong());


Exception:


Caused by: java.lang.LinkageError: duplicate class definition: TestReturn