Running headless with developer GAMA version

54 views
Skip to first unread message

James Humann

unread,
Feb 27, 2020, 6:30:15 PM2/27/20
to GAMA
I'm trying to follow the example tutorial for headless GAMA from:

I try to run "./gama-headless.bat samples/predatorPrey.xml ABCXYZ"  and get the following error:
******************************************************************
* GAMA version 1.8                                               *
* http://gama-platform.org                                                        *
* (c) 2007-2019 UMI 209 UMMISCO IRD/SU   and Partners            *
******************************************************************
GAMA is starting...
Error: Could not find or load main class org.eclipse.core.launcher.Main

the gama-headless.bat file is in git > gama > msi.gama.headless > ext > windows > samples

Can anyone help? Am I doing something wrong, as it looks like the tutorial was written for Linux, so perhaps my commands in Windows PowerShell are wrong? Or it needs to be done differently in developer version?

Benoit Gaudou

unread,
Feb 28, 2020, 9:27:34 AM2/28/20
to gama-p...@googlegroups.com
Hi,

As you are using the development version, the fact is that the headless plugin (msi.gama.headless) comes with a launcher (2 in facts).
You could try to run the launcher: msi.gama.headless.id4.launch (that should execute the same models than the examples provided on the website).

If I am not wrong, but I am not sure on this point.
The scripts are only here to be packaged in the GAMA release versions; I do not think they can be used to run the headless mode.

The big BUT to this, is that on my version of the dev version of GAMA, the launchers do not work ...
We have to investigate whether this an issue or a misuse from my side.

Sorry for this unsatisfying answer.

Cheers

Benoit



--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gama-platform/e863c5c4-0c4a-439c-b8c3-d4d56d07bbb8%40googlegroups.com.

Huynh Quang Nghi 002628

unread,
Feb 28, 2020, 10:14:11 AM2/28/20
to gama-p...@googlegroups.com
Hi,
I just commit a working launcher for headless . The fact is that Benoit is right, you must use eclipse and git version (full code of gama) , see the wiki on how to install the developer version.
Then, in msi.gama.headless plugin, there is a launcher that you can use to launch headless, by clicking on small triangle of play button, you can config xml file and output path (like in my screenshot).
Cheers.
image.png
image.png







--
-------
HUYNH Quang-Nghi, Ph.D.
Lecturer
College of Information and Communication Technology - Can Tho University
Campus II, 3/2 street, Ninh Kieu district
Can Tho city, Vietnam
[Vietnam] +84909128322

James Humann

unread,
Mar 2, 2020, 8:04:11 PM3/2/20
to GAMA
Thank you! The latest commit works, I was able to run the example predatorPrey.xml through Eclipse.

James Humann

unread,
Mar 3, 2020, 7:36:15 PM3/3/20
to GAMA
Is there a way to do this from the command line now, instead of through Eclipse? Eventually I will want an external program to load simulations and collect results.

Huynh Quang Nghi 002628

unread,
Mar 3, 2020, 7:39:20 PM3/3/20
to gama-p...@googlegroups.com
Hi, noway to do headless eclipse as you are using a launcher of eclipse, so use the gama built version, not git from eclipse, you can download the latest continuous build or you can make one with maven install. 

--
You received this message because you are subscribed to the Google Groups "GAMA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages