Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
6f54bfc20210058c5ca116dc6056ccc0b01fd314
[simgrid.git] / examples / deprecated / java / app / centralizedmutex / Main.java
1 /* Copyright (c) 2012-2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 package app.centralizedmutex;
7
8 import org.simgrid.msg.Msg;
9
10 class Main {
11   private Main() {
12     throw new IllegalAccessError("Utility class");
13   }
14
15   public static void main(String[] args) {
16     Msg.init(args);
17
18     String platf  = args.length > 1 ? args[0] : "../platforms/small_platform.xml";
19     String deploy =  args.length > 1 ? args[1] : "./centralizedmutex.xml";
20
21     /* construct the platform and deploy the application */
22     Msg.createEnvironment(platf);
23     Msg.deployApplication(deploy);
24
25     /*  execute the simulation. */
26     Msg.run();
27   }
28 }