Error occurred during initialization of VM.
Could not reserve enough space for object heap.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
bat 文件有以下命令:
java -cp stanford-corenlp-3.2.0.jar;stanford-corenlp-3.2.0-models.jar;xom.jar;joda-time.jar;jollyday.jar -Xmx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -props props.properties -filelist filelist.txt
它可以在 cmd 窗口中正常工作,没有错误!
我有以下python代码:
import os
import subprocess
os.chdir('C:/Users/Christos/Documents/stanford-corenlp-full-2013-06-20/')
p = subprocess.Popen(r'start cmd /c run_mouskos.bat', shell=True)
p.wait()
print 'done'
我还尝试了各种其他方法来从 python 执行 bat 文件,但没有成功。我怎样才能在没有错误的情况下运行它?