Hi All,
My shell script will call a java component with some arguments , the java component returns a string value to the shell script. How to assign the return value to the shell variable.
Here is the sample code.
In my shell script i am calling the java as fallows.
--exporting classpaths and relevant jar files
java com.sample.Demo arg1 arg2
Demo.java
has return value "myReturnValue"
How to handle this return value in the shell scripting.
Please help me it is argent.
Note Java takes arguments.
if it does not takes arguments below code is fine
ret_value=`java com.sample.Demo`
echo "$ret_value"