karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-908) Provide a way to access system properties easily in the shell
Date Thu, 29 Sep 2011 12:12:45 GMT
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
            Reporter: Guillaume Nodet


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

        

Mime
View raw message