Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
public class Solution {
public static void main(String[] args) throws IOException, InterruptedException {
Solution solution = new Solution();
String fileNameToBeOpenedByNotepad = solution.getAbsolutePathToDefaultTxtFile().toString();
Process notepad = solution.getProcessStartNotepad(fileNameToBeOpenedByNotepad);
String nameOfFileToBeOpenedByNotepad = solution.getAbsolutePathToDefaultTxtFile().toString();
Process notepad = solution.getStartNotepadProcess(nameOfFileToBeOpenedByNotepad);
notepad.waitFor();
}

public Process getProcessStartNotepad(String fileName) throws IOException {
public Process getStartNotepadProcess(String fileName) throws IOException {
String[] cmdArray = new String[]{"notepad.exe", fileName};
return Runtime.getRuntime().exec(cmdArray);
}
Expand Down