[Biojava-l] Query

Tom Oinn tmo at ebi.ac.uk
Thu May 31 15:10:58 UTC 2007


rohit reja wrote:
> Hello all,
> 
> I am working on HMMER which runs on a command line interface(CLI).
> Now i want to create and integrate a GUI to execute the commands on the  CLI
> .
> How can we do this using java .?

This isn't really a BioJava question (this list is for discussion of the 
BioJava project and its usage) but...

You can use the system Runtime class in Java to exec external tools, 
your application will have to construct the command line then create a 
Process object from this command line which has streams from which you 
can manipulate stdin and stdout for the process. Google for 'Java 
Runtime exec' for plenty more information.

Hint - the process will block unless you consume both stdout and stderr 
streams, blocking when the buffer for those streams (which is OS and 
Java version dependant) is full. If you get odd behaviour with the 
application sometimes hanging this is probably why!

Cheers,

Tom

> Please reply ASAP.

ps - don't ask people to reply ASAP, it just annoys people! The 
assumption if you ask a question on a mailing list is that you'd like an 
answer :)





More information about the Biojava-l mailing list