You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Guillaume Nodet (Resolved) (JIRA)" <ji...@apache.org> on 2011/09/30 14:31:45 UTC
[jira] [Resolved] (KARAF-908) Provide a way to access system
properties easily in the shell
[ https://issues.apache.org/jira/browse/KARAF-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet resolved KARAF-908.
-----------------------------------
Resolution: Fixed
Assignee: Guillaume Nodet
> Provide a way to access system properties easily in the shell
> -------------------------------------------------------------
>
> Key: KARAF-908
> URL: https://issues.apache.org/jira/browse/KARAF-908
> Project: Karaf
> Issue Type: New Feature
> Components: karaf-shell
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Fix For: 3.0.0
>
>
> There's no easy way to access system properties in the shell.
> Something like:
> {code}
> > echo ${karaf.name}
> {code}
> should print the system property if the session has no property named karaf.name defined.
> As a workaround, the following script can be used:
> {code}
> system-property = { ((($.context bundle) loadClass java.lang.System) getMethod getProperty java.lang.String) invoke null $1 }
> echo "$(system-property karaf.name)"
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira