hi i new in java and i try to run executable (exe) of vienna packge from eclipse java, i want it will get string and use this on the exe , and i want to save the output of the exe in txt file, how can i do it?
String[] params = new String [2];
params[0] = "C:\\Program Files (x86)\\ViennaRNA Package\\RNAup.exe";
params[1] = "GHHI";
try (PrintStream out = new PrintStream(new FileOutputStream("filename.txt"))) {
out.print(Runtime.getRuntime().exec(params));
}
tnx