This is for a minecraft server, I'm using python to handle multiple server folders each one has a start.bat in it.
This is what the start.bat looks like:
java -Xmx4G -jar server.jar nogui
pause
It works fine if I double-click it, however, if I call it from python like this:
import os
os.system('server\\start.bat')
Python says: '1' and cmd says: Error: Unable to access jarfile server1.15.jar
I looked at this post, and tried the following:
- changed 'server.jar' to 'server' in the start.bat
- changed directory
- provided a full path to the start.bat file
- checked for spaces in my path (and found none)
- tried running the file as administrator
None of the above worked for me, any clue?
edit 2: I could also start the jar file directly from python, without using the bat file, but I hava no idea how to do it