public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, AssemblyException { String applicationAssemblerName = args[0]; Class applicationAssemblerClass = Class.forName(applicationAssemblerName); ApplicationAssembler assembler = (ApplicationAssembler) applicationAssemblerClass.newInstance(); Energy4Java energy4Java = new Energy4Java(); ApplicationDescriptor application = energy4Java.newApplicationModel(assembler); new Envisage().run(application); }
public static void main(String[] args) throws Exception { qi4j = new Energy4Java(); ApplicationDescriptor model = qi4j.newApplicationModel( new ApplicationAssembler() { @Override public ApplicationAssembly assemble(ApplicationAssemblyFactory applicationFactory) throws AssemblyException { return createAssembly(applicationFactory); } }); Application application = model.newInstance(qi4j.spi()); }