Revision [535]

This is an old revision of CommandJCall made by DavidLee on 2009-05-18 14:55:31.

 

Command jcall


Name

jcall calls a java program (any class's static main)

Synopsis

jcall [-cp|-classpath classpath ] classname [args]

Description

Calls a java program from within the same JVM and thread as the current shell.

"classname" is the full package and class name, e.g. "org.xmlsh.commands.xpwd"
Args are optional arguments to be sent to called class.

-cp classpath
-classpath classpath Uses the specified classpath in the classloader for calling the specified class. The classpath is expected to be a single string or sequence of strings.l



This command simulates the equivilent call to "java" command line.
The class is attempted to be loaded, and the main function called with the supplied parameters.

Note, stdin and stdout are redirected to the shell's input and output, but stderr is not changed (remains the stderr of the calling environment, due to java limitations).

Example
$ cp=(lib/*.jar)
$ jcall -cp $cp org.test.MyClass arg1 arg2 arg3





CategoryCommands
CommandsInternal

There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki