1
Someone could ask me a question, as I do to read and edit a file . bat by java, in case I have a file . bat I want to open it in . txt to change, the method below is what I am using
public void editarArquivo() throws SQLException, IOException{
DirControle dir = new DirControle();
String directory = dir.selectedDir_CB().toString().replace("[", "").replace("]", "");
Runtime.getRuntime().exec("notepad "+directory+"\\"+getPasta()+"\\"+getArchive());
}
where directory is the path to my file getPasta() is a folder before the file and getArchive() the file itself