Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String path= Entry_file.getPath();
- String ch2="cmd /c C:\TreeTagger\bin\tag-english"+" "+path;
- Process p2;
- try {
- p2 = Runtime.getRuntime().exec(ch2);
- p2.waitFor();
- System.out.println(p2.exitValue());
- BufferedWriter output=new BufferedWriter(new FileWriter(Etiq_result));
- BufferedReader input =
- new BufferedReader
- (new InputStreamReader(p2.getInputStream()));
- String line;
- while((line = input.readLine()) != null)
- {
- System.out.println("line "+line);
- output.write(line);
- output.flush();
- output.write("rn");
- output.flush();
- }
- }
- catch (InterruptedException e) {
- e.printStackTrace();
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement