Your server's working directory is now the same as that of your wrapper. If you started it by double-clicking a jar package, it's the directory where that package is. Look for the server's files, including eula.txt, there.
If you want to change that, consider using this overload of Runtime.exec.
As for sending commands, just send them to the server via standard input. You can access that by using Process.getOutputStream().
When I run the code, the server jar instantly closes as if I hadn't agreed to the eula. How can I fix this?
Also, is there an easy way to type in commands to the console? Or do I need to search more on the internet?
Your server's working directory is now the same as that of your wrapper. If you started it by double-clicking a jar package, it's the directory where that package is. Look for the server's files, including eula.txt, there.
If you want to change that, consider using this overload of Runtime.exec.
As for sending commands, just send them to the server via standard input. You can access that by using Process.getOutputStream().
As long as we stand, we will fight!