[kepler-dev] Determine whether -nogui was specified
David Welker
david.v.welker at gmail.com
Wed Aug 12 09:50:52 PDT 2009
There is no really good way to do this at present.
If -nogui passed in as an argument, then that affects what is called
(either org.kepler.KeplerConfigurationApplication or
ptolemy.moml.MoMLCommandLineApplication) but unfortunately the fact
that -nogui was passed in is not otherwise stored.
A hackish way to detect whether new -nogui was passed in that should
work (I haven't tried it) would be to examine the current stack trace
and see if either of the following is present.
org.kepler.KeplerConfigurationApplication.main(String[] args)
OR
ptolemy.moml.MoMLCommandLineApplication(String[] args)
One of these classes is called if and only if -nogui was passed in as
a command-line argument.
What are you trying to accomplish? Should we make it more convenient
to determine whether -nogui has been passed in on the command line?
-David
On Aug 12, 2009, at 2:38 AM, Michal Owsiak wrote:
> Hello all,
>
> I want to check within the actor's fire() method whether Kepler was
> started with "-nogui" argument. Is it possible to determine whether
> this
> switch was used during Kepler execution? How this information can be
> retrieved?
>
> Regards
>
> Michal
>
> --
> Michal Owsiak <michalo at man.poznan.pl>
> Poznan Supercomputing and Networking Center
> ul. Noskowskiego 10, 61-704 Poznan, POLAND
> http://www.man.poznan.pl
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://mercury.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
More information about the Kepler-dev
mailing list