Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
define a process package in examples/java
[simgrid.git] / examples / java / process / kill / Main.java
1 /* Copyright (c) 2006-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 package process.kill;
8
9 import org.simgrid.msg.Msg;
10 import org.simgrid.msg.MsgException;
11 import org.simgrid.msg.NativeException;
12
13 public class Main {
14   public static void main(String[] args) throws NativeException {
15     /* initialize the MSG simulation. Must be done before anything else (even logging). */
16     Msg.init(args);
17     Msg.createEnvironment(args[0]);
18
19     /* bypass deploymemt */
20     try {
21       Killer killer = new Killer("Jacquelin","killer");
22       killer.start();
23     } catch (MsgException e){
24       System.out.println("Create processes failed!");
25     }
26
27     /*  execute the simulation. */
28     Msg.run();
29   }
30 }