title: Exception while trying to acquire a JMH lock
body: <p>This code was working fine. On restarting the computer, it gives me the error:</p>
  
  <pre><code>ERROR: org.openjdk.jmh.runner.RunnerException: 
  ERROR: Exception while trying to acquire the JMH lock (C:\WINDOWS\/jmh.lock): 
  Access is denied, exiting. Use -Djmh.ignoreLock=true to forcefully continue.
  at org.openjdk.jmh.runner.Runner.run(Runner.java:213)
  at org.openjdk.jmh.Main.main(Main.java:71)
  </code></pre>
  
  <p>Google-int the error didn't help. Can someone tell me how to fix it?</p>
  
  <pre><code>@State(Scope.Thread)
  public class test {
      public ConcurrentHashMap&lt;String,Integer&gt; i = new ConcurrentHashMap&lt;String, Integer&gt;(10000);
      public ArrayList&lt;String&gt; k = new ArrayList&lt;String&gt;(10000);
      public int p=0;
  
  public void setup(){
      for(int m=0;m&lt;1000;m++){
          int j=ThreadLocalRandom.current().nextInt(0,10000);
          String jk=Integer.toString(j);
          k.add(jk);
          i.put(jk,j);
      }
  }
  
  @Benchmark
  @BenchmarkMode(Mode.Throughput)
  @OutputTimeUnit(TimeUnit.MILLISECONDS)
  @Warmup(iterations = 3)
  @Measurement(iterations = 5)
  public void putKey(){
      int n=ThreadLocalRandom.current().nextInt(0,10000);
      String nk=Integer.toString(n);
      k.add(nk);
      i.put(nk,n);
  }
  
  @Benchmark
  @BenchmarkMode(Mode.Throughput)
  @OutputTimeUnit(TimeUnit.MILLISECONDS)
  @Warmup(iterations = 3)
  @Measurement(iterations = 5)
  public int getKey(){
      p=ThreadLocalRandom.current().nextInt(0,10000);
      p=p%k.size();
      return i.get(k.get(p));
  }
  public static void main(String[] args) throws RunnerException{
      Options opt = new OptionsBuilder()
              .include(".*" + test.class.getSimpleName() + ".*")
              .forks(1)
              .build();
      new Runner(opt).run();
  }
  </code></pre>
  
  <p>}</p>