Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
java: kill obscure NativeException
[simgrid.git] / examples / java / energy / consumption / Main.java
index 1297b9a..3ac36da 100644 (file)
@@ -7,13 +7,15 @@
 package energy.consumption;
 
 import org.simgrid.msg.Msg;
-import org.simgrid.msg.Host;
 import org.simgrid.msg.MsgException;
 
 public class Main {
   public static final double task_comp_size = 10;
   public static final double task_comm_size = 10;
   public static final int hostNB = 2 ; 
+  private Main() {
+    throw new IllegalAccessError("Utility class");
+  }
 
   public static void main(String[] args) throws MsgException {  
     Msg.energyInit(); 
@@ -26,7 +28,7 @@ public class Main {
     }
     /* Construct the platform */
     Msg.createEnvironment(args[0]);
-    /* Instanciate a process */
+    /* Instantiate a process */
     new EnergyConsumer("MyHost1","energyConsumer").start();
     /* Execute the simulation */
     Msg.run();