En C une solution serait de trafiquer le processus fils pour remplacer son stdin par un pipe, en utilisant popen(3) par exemple. popen(3) étant POSIX.2, peut être est-elle disponible directement dans l'API Java.
Plus particulièrement, la fonction:
public java.io.OutputStream getStandardInputStream()
throws ExecutionComponentStateException
Get the OutputStream for writing to the process's stdin pipe. It is available after process is launched.
# stdin
Posté par JaguarWan . En réponse au message Authentification pour une commande exécutée dans un exec(). Évalué à 2.
En Java pur, en regardant sur google vite fait j'ai trouvé ça:
http://download.eclipse.org/tptp/4.2.0/javadoc/Platform/publ(...)
Plus particulièrement, la fonction:
public java.io.OutputStream getStandardInputStream()
throws ExecutionComponentStateException
Get the OutputStream for writing to the process's stdin pipe. It is available after process is launched.
Voilà, j'espère que ça pourra t'aider.