I'm trying to run a simple ls -l command(just for testing). But it somehow can't find the directory. My code:
ProcessBuilder processBuilder = new ProcessBuilder("ls -l");
processBuilder.directory(new File("/home/minecraft/paper/event"));
Process process = processBuilder.start();
Error:
java.io.IOException: Cannot run program "ls -l" (in directory "/home/minecraft/paper/event"): error=2, No such file or directory
I tested multiple ways with and without a processbuilder but none of them worked
Thanks