Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Spatiotemporal Epidemiological Modeler (STEM) » Help running STEM Headless
Help running STEM Headless [message #660321] Thu, 17 March 2011 21:11 Go to next message
No real name is currently offline No real name
Messages: 1
Registered: March 2011
Junior Member
Hi, I have a few questions about STEM. I want to run STEM headless (aka without any UI). I want to pass in the path to a scenario, STEM will do its work on the scenario, and eventually output the .csv files.

I have read through many posts on this forum, and the following helped the most: http://www.eclipse.org/forums/index.php?t=msg&th=164822& amp;start=0& .

I could not get either of the suggestions in that post working. If I tried to run a scenario through a main an error popped up about workspace, the URI complained about "platform: ". The second approach for IApplication did not work either, even though I changed the plugin.xml file as specified in the post.

This is the IApplication error:
"An internal error occurred during: "Launching org.eclipse.stem.ui.headless.MyApplicationLoader".
Invalid registry object"

Is there an easy way to run STEM headlessly, possibly without the UI of eclipse?

Eventually I want to run stem programmatically, my own main tells STEM what to do.

Thanks to anyone for help.
Re: Help running STEM Headless [message #660513 is a reply to message #660321] Fri, 18 March 2011 18:54 Go to previous message
Matthew Davis
Messages: 269
Registered: July 2009
Senior Member
Hi,

We're currently developing a simple headless feature that'll run scenarios without the STEM UI. Right now, it's not "true" headless - it requires some type of X subsystem, even though no UI shells are created. We haven't included it in any binary builds yet, but it is checked in - see the org.eclipse.stem.ui.headless plug-in in SVN.

Early documentation available here:
http://wiki.eclipse.org/STEM_Headless

This also builds upon a new feature that will allow you to provide your own STEM "launcher", which will help with your attempts to call STEM programatically.

This feature isn't well-documented yet, but it uses a new extension point called org.eclipse.stem.ui.launchers. See the example in the org.eclipse.stem.ui.headless/plugin.xml file:


<extension
point="org.eclipse.stem.ui.launchers">
<launcher
class="org.eclipse.stem.ui.headless.HeadlessLauncher"
name="headless">
</launcher>
</extension>

In your own plugin, you can create your own launcher class (extends org.eclipse.stem.ui.launcher.Launcher) and register the extension in plugin.xml. You can then use a command-line switch that matches the name of your launcher to invoke it. The above example is named "headless" and looks for the "-headless" switch. If the name was "myheadless", it would look for "-myheadless" when invoking STEM either through the binary or directly through Java.

Will have documentation for launchers available shortly.

Hope this helps!
-Matt
Previous Topic:Jubula Webcast at Eclipse Live
Next Topic:Working with CSV files
Goto Forum:
  


Current Time: Thu Oct 23 08:13:49 GMT 2014

Powered by FUDForum. Page generated in 0.02510 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software