Message255
Hi.
Maybe this was not clear:
clearly the technique does not work in pure java (at least under sun jvm) either.
Consider:
* M.java
public class M {
public static void main(String[] args) {
String currPath = System.getProperty("java.class.path");
String separator = java.io.File.pathSeparator;
currPath += separator + "jar1.jar";
System.out.println(currPath);
System.setProperty("java.class.path", currPath);
try {
Class c = Class.forName("C");
} catch(Throwable e) {
System.err.println(e);
}
}
}
* C.java (then compiled to C.class, which is put in jar1.jar")
public class C {}
Running java M one gets:
.:jar1.jar
java.lang.ClassNotFoundException: C
Setting classpath after java init has no effect (!).
regards, Samuele Pedroni. |
|
Date |
User |
Action |
Args |
2008-02-20 17:16:47 | admin | link | issue228540 messages |
2008-02-20 17:16:47 | admin | create | |
|