I want to return a value from shell script to java code? That value may be a file name or any string. Is it possible? If yes, then how to do it? Can I get any steps or API's for that.


Recommended Answers

See http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html for things to do and watch out for when using Runtime.exec()/ProcessBuilder. It also covers reading the STDOUT and STDERR of the program executed, which is how you'll have to "get your value".

Jump to Post

All 2 Replies

Thanks for ur reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.