I have a Discord bot that I have only recently started running from terminal. It runs fine when running it in IntelliJ for hours or even days (yes I know waste of resources), but I have noticed that when running it in terminal now it stops after a few hours and I don't know why.
Running it with java -jar file
Problem was I was running code that looked for an external file. When running in IntelliJ it naturally ran it from the folder it existed in, but in the terminal I was running it with the full location, rather than changing directory to that folder first. So then when calling to look for X.file, it was just looking in the C drive rather than the folder it existed in.