This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, Does anyone know how to get output string parameter from Java to shell script. which means when shell script execute a java with input string parameter(20 bytes) and Java program return an output string parameter.
is that possible to return a string to sell script? if so, how java can return and how to retrieve this string output value from shell script progtam.
I understand the question the other way round, Ulf.
Sending 20 bytes to Java can be done in two ways: As inputstream or by arguments.
grab the output in the shell:
Using a parameter works this way:
and is called
will not work, since date responds with Sa 15 Dez 21:14:37 CET 2007 which is 6 Strings (seperated by whitespace). Masking them with "..." glues them together with blanks inside. If your bytes aren't printable, it might be useful as well to mask them.