Results 1 to 7 of 7

Thread: Help running Netlogo

  1. #1
    Join Date
    Apr 2008
    Location
    UK
    Beans
    74
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Help running Netlogo

    Hello, I am trying to run/install Netlogo simulation tool that I have to use on my Open University course.

    I have downloaded & untarred the program in my home directory. What do I do next?

    I tried this: http://ubuntuforums.org/showthread.php?t=573176
    which tells to run the NetLogo.jar file using Sun Java 6 Runtime (I went to right-click - run). Nothing happened.


    I also saw this: http://ubuntuforums.org/showthread.php?t=116441
    which says that even I have Sun Java 6, Netlogo tries to use gcj java. I tried the same command on the terminal:
    Code:
    tuisku@Frog:~$ sudo update-java-alternatives -l
    java-6-sun 63 /usr/lib/jvm/java-6-sun
    tuisku@Frog:~$ cd /home/tuisku/Applications/Netlogo
    tuisku@Frog:~/Applications/Netlogo$ java -jar NetLogo.jar
    Exception in thread "main" java.lang.NoClassDefFoundError: org.nlogo.app.App
       at java.lang.Class.initializeClass(libgcj.so.10)
    Caused by: java.lang.ClassNotFoundException: org.picocontainer.Parameter not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:NetLogo.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
       at java.net.URLClassLoader.findClass(libgcj.so.10)
       at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.10)
       at java.lang.ClassLoader.loadClass(libgcj.so.10)
       at java.lang.ClassLoader.loadClass(libgcj.so.10)
       at java.lang.Class.initializeClass(libgcj.so.10)
    tuisku@Frog:~/Applications/Netlogo$
    Any ideas? You may need to spell them out as I am not that experienced on Linux. Thanks

  2. #2
    Join Date
    Apr 2006
    Beans
    57
    Distro
    Ubuntu

    Re: Help running Netlogo

    I've just downloaded the netlogo from their site. I've downloaded the Linux version 4.1, after extracting it, I've seen that there is a netlogo.sh file, which I ran from terminal like this:

    mark@mark-desktop:~/Downloads/temp/netlogo-4.1$ ./netlogo.sh

    And it worked just fine. You don't need to run the jar file. this sh script sets all the needed parameters for netlogo to run.

    The java alternatives on my system is exactly as yours, so you should run it with no problems either.

    Hope this helps.

    Cheers;

  3. #3
    Join Date
    Apr 2008
    Location
    UK
    Beans
    74
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Help running Netlogo

    Thanks anagor! Something must have gone wrong with the download - there was no .sh file. I downloaded it again and when extracted, ticked 'recreate folders'. Don't know if that had any significance but the .sh file is there and the folder looks better.

    However, something is still not right, but not sure what:

    tuisku@Frog:~/Applications/netlogo-4.1$ ./netlogo.sh
    Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
    at java.awt.Toolkit.getDefaultToolkit(libgcj.so.10)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvir onment(libgcj.so.10)
    at java.awt.Window.<init>(libgcj.so.10)
    at java.awt.Frame.<init>(libgcj.so.10)
    at java.awt.Frame.<init>(libgcj.so.10)
    at org.nlogo.window.VMCheck.warn(VMCheck.java:40)
    at org.nlogo.window.VMCheck.detectBadJVMs(VMCheck.jav a:31)
    at org.nlogo.app.App.main(App.java:116)
    Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
    at java.lang.Runtime._load(libgcj.so.10)
    at java.lang.Runtime.loadLibrary(libgcj.so.10)
    at java.lang.System.loadLibrary(libgcj.so.10)
    at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.s o.10)
    at java.lang.Class.initializeClass(libgcj.so.10)
    at java.lang.Class.forName(libgcj.so.10)
    at java.awt.Toolkit.getDefaultToolkit(libgcj.so.10)
    ...7 more
    tuisku@Frog:~/Applications/netlogo-4.1$ ^C

  4. #4
    Join Date
    Apr 2008
    Location
    UK
    Beans
    74
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Re: Help running Netlogo

    Alright... I am closer to the solution I hope. After the error messages above, I went to Synaptic and installed the missing libgcj10-awt. Then I ran netlogo.sh file. Netlogo started with a warning box (attached) saying that I'm not using Sun Java, I'm using gcj Java. I aborted Netlogo.

    How to get Netlogo to use Sun Java?
    Attached Images Attached Images

  5. #5
    Join Date
    Apr 2008
    Location
    UK
    Beans
    74
    Distro
    Ubuntu 9.10 Karmic Koala

    Talking Re: Help running Netlogo

    Yes! I answered my own question! I run a command sudo update-alternatives --config java
    to change the default java to Sun Java and then ran the netlogo.sh file, that worked beautifully!

    Code that I used: (you can see that I chose option 3 - it was 0 before, as marked with the *)
    Code:
    tuisku@Frog:~/Applications/netlogo-4.1$ sudo update-alternatives --config java
    [sudo] password for tuisku: 
    There are 3 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                  Priority   Status
    ------------------------------------------------------------
    * 0            /usr/bin/gij-4.4                       1044      auto mode
      1            /usr/bin/gij-4.3                       43        manual mode
      2            /usr/bin/gij-4.4                       1044      manual mode
      3            /usr/lib/jvm/java-6-sun/jre/bin/java   63        manual mode
    
    Press enter to keep the current choice[*], or type selection number: 3
    update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.
    Last edited by Juhla Mokka; March 20th, 2010 at 03:54 PM. Reason: added code

  6. #6
    Join Date
    May 2007
    Location
    Ghent, Belgium
    Beans
    13

    Re: Help running Netlogo

    edit: message got obsolete
    Last edited by Stafke; November 7th, 2010 at 05:06 PM. Reason: obsolete...

  7. #7
    Join Date
    Feb 2013
    Beans
    1

    Re: Help running Netlogo

    Hello!!! I am a new Ubuntu user and I'm trying to have an icon to access Netlogo from the desktop.

    Somebody knows how to do that?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •