first solution using static field in class


In [ ]:
package test.beaker;
public class BeakerTest {
    public static String location ;    
}

In [ ]:
test.beaker.BeakerTest.location = "../resources/jar/";

In [ ]:
%classpath add dynamic return test.beaker.BeakerTest.location + "demo.jar";

In [ ]:
import com.example.Demo;
Demo demo = new Demo();
return demo.getObjectTest();

second solution using autotranslation


In [ ]:
NamespaceClient.getBeakerX().set("location","../resources/jar/");

In [ ]:
%classpath add dynamic return NamespaceClient.getBeakerX().get("location")+ "demo.jar";

In [ ]:
import com.example.Demo;
Demo demo = new Demo();
return demo.getObjectTest();