On 3/5/14, 12:03 , Guillaume Nodet wrote:
Try the following:
   addcommand ($.context loadClass java.lang.System)

Or:

g! addcommand system ((bundle 0) loadClass java.lang.System)

You need to give it a class loader for doing the loadClass...

-> richard



2014-03-05 17:42 GMT+01:00 Daniel McGreal <[email protected]>:

Hi Felix users,


https://felix.apache.org/documentation/subprojects/apache-felix-gogo/rfc-147-overview.html(which
 has quite some formatting issues, btw).
// add all public methods on java.lang.System as commands:

g! addcommand system (loadClass java.lang.System)
g! system:getproperties
sun.io.unicode.encodingUnicodeLittle
java.version        1.5.0_19
java.class.path     bin/felix.jar
java.awt.graphicsenvapple.awt.CGraphicsEnvironment
user.language       en
sun.os.patch.level  unknown
os.version          10.6.2
[snip]
g! addcommand (loadClass java.lang.System)
gogo: CommandNotFoundException: Command not found: loadClass

What am I doing wrong? I have the three org.apache.felix.gogo.* jars from
https://felix.apache.org/downloads.cgi

I actually want to try to call Runtime.getInstance().maxMemory(). Is this
possible?

Best, Dan.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to