*** When i am trying to execute my java class contains the:
import org.bonitasoft.engine.api.PlatformAPI;
import org.bonitasoft.engine.api.PlatformAPIAccessor;
import org.bonitasoft.engine.api.PlatformLoginAPI;
import org.bonitasoft.engine.exception.BonitaException;
import org.bonitasoft.engine.exception.BonitaHomeNotSetException;
import org.bonitasoft.engine.exception.ServerAPIException;
import org.bonitasoft.engine.exception.UnknownAPITypeException;
import org.bonitasoft.engine.session.PlatformSession;
public class Platform {
public static void main(String args) throws BonitaException, ServerAPIException, Exception {
// TODO Auto-generated method stub
PlatformLoginAPI platformLoginAPI = PlatformAPIAccessor.getPlatformLoginAPI();
PlatformSession platformSession = platformLoginAPI.login("platformAdmin", "platform");
// Get the platform API
PlatformAPI platformAPI = PlatformAPIAccessor.getPlatformAPI(platformSession);
// create the platform
platformAPI.createPlatform();
// initialize the platform
platformAPI.initializePlatform();
// start the execution engine
platformAPI.startNode();
}
}
ERROR*********
Exception in thread “main” org.bonitasoft.engine.exception.BonitaHomeNotSetException: You need to set the system property: bonita.home
at org.bonitasoft.engine.home.BonitaHome.getBonitaHomeFolder(BonitaHome.java:34)
at org.bonitasoft.engine.home.BonitaHomeClient.getBonitaHomeClientFolder(BonitaHomeClient.java:42)
at org.bonitasoft.engine.util.APITypeManager.getProperties(APITypeManager.java:77)
at org.bonitasoft.engine.util.APITypeManager.getProperty(APITypeManager.java:72)
at org.bonitasoft.engine.util.APITypeManager.getAPIType(APITypeManager.java:45)
at org.bonitasoft.engine.api.PlatformAPIAccessor.getServerAPI(PlatformAPIAccessor.java:46)
at org.bonitasoft.engine.api.PlatformAPIAccessor.getPlatformLoginAPI(PlatformAPIAccessor.java:80)
at Platform.main(Platform.java:15)
Picked up _JAVA_OPTIONS: -Xmx512M