Netlogo and MXJ – java compiling issues

Sep 21, 2011 at 7:43am

Netlogo and MXJ – java compiling issues

Hi there,

I’m trying to create an mxj object to run and query Netlogo Models
in max.

Using the Netlogo Example code (( I’m trying to open Netlogo from max and run the commands as a simple test. Unfortunately, I’m having problems compiling (see below). I’ve included all the relevant jar files from max and Netlogo (as instructed on the website) in the classpath and am building directly to the Cycling ’74/java/classes directory.

I’m new to java so this is proving quite difficult.
Any advice to help me started would be much appreciated.


[System: OSX 10.6.8 / Max 5.1.8 / Netlogo 4.1.3 / Java 1.6]


import com.cycling74.max.*;

public class Example1 extends MaxObject {

public static void main(String[] argv) {
try {
( new Runnable()
{ public void run() {
try {
(“models/Sample Models/Earth Science/”
+ “Fire.nlogo”);
catch( ex ) {
} } );“set density 62″);“random-seed 0″);“setup”);“repeat 50 [ go ]“);
catch(Exception ex) {

MXJ Compile Window error:

javac: invalid flag: /Applications/Max5/Cycling ’74/java/classes/Example1
Usage: javac

use -help for a list of possible options
[ Sep 21, 2011 4:30:39 PM ]
compilation of /Applications/Max5/Cycling ’74/java/classes/Example1 failed

May 21, 2012 at 7:53pm

Did you ever figure this out? just found out about netlogo and it seems it could be a powerful combo…


You must be logged in to reply to this topic.