DISCLAIMER: I am not an experienced java programmer, and have a total of maybe 
8 hours with this language. I am simply trying to work with the NetLogo API to 
automate simulations on NetLogo, and I have been following the NetLogo API 
tutorial (https://github.com/NetLogo/NetLogo/wiki/Controlling-API).

After attempting to compile the java code found in "Example1.java" with "javac" 
on a MacOSX 10.9.5, running Java 1.8.0_65, I am encountering this error:

user$ javac Example1.java 

Example1.java:4: error: cannot access ScalaObject
    App.main(argv);     
       ^
  class file for scala.ScalaObject not found
1 error

CODE:

import org.nlogo.app.App;
public class Example1 {
  public static void main(String[] argv) {
    App.main(argv);
    try {
      java.awt.EventQueue.invokeAndWait(
    new Runnable() {
      public void run() {
        try {
          App.app().open(
        "models/Sample Models/Earth Science/"
        + "Fire.nlogo");
        }
        catch(java.io.IOException ex) {
          ex.printStackTrace();
        }}});
      App.app().command("set density 62");
      App.app().command("random-seed 0");
      App.app().command("setup");
      App.app().command("repeat 50 [ go ]");
      System.out.println(
    App.app().report("burned-trees"));
    }
    catch(Exception ex) {
      ex.printStackTrace();
    }
  }
}

Any insight would be greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to