KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > CreateJonasBase


1 /*
2  * Created on 4 juin 2003
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */

7 package com.bull.eclipse.jonas;
8
9 /**
10  * @author Emmanuel Rias
11  *
12  * To change the template for this generated type comment go to
13  * Window>Preferences>Java>Code Generation>Code and Comments
14  */

15
16 import java.io.File JavaDoc;
17
18 import org.eclipse.ant.core.AntRunner;
19 import org.eclipse.core.runtime.CoreException;
20
21 import com.bull.eclipse.jonas.utils.TemplateDirUtil;
22
23 public class CreateJonasBase {
24
25     public static void createJonasServer(String JavaDoc jonas_base) throws CoreException {
26         AntRunner antRunner = new AntRunner();
27         String JavaDoc jonas_root = JonasLauncherPlugin.getDefault().getJonasDir();
28         String JavaDoc buildFileLocation = TemplateDirUtil.getTemplateDir() + File.separator + "CreateJonasBase.xml";
29         antRunner.setBuildFileLocation(buildFileLocation);
30         String JavaDoc[] arguments = {"-Djonas.root=" + jonas_root , "-Djonas.base=" + jonas_base };
31         antRunner.setArguments(arguments);
32         String JavaDoc[] task = {"create_jonasbase"};
33         antRunner.setExecutionTargets(task);
34         antRunner.run();
35     }
36 }
37
Popular Tags