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文件具有以下命令:運行從蟒蛇一個bat文件,而直接從CMD
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'
我也試過,沒有運氣從蟒蛇執行bat文件的各種其他方式。我怎樣才能沒有錯誤地運行它?
你有沒有試過直接在'Popen'調用中提供路徑? – LostAvatar
是否直接從Python運行java命令(繞過批處理文件)實現了什麼? – misha
我已經嘗試了兩件事,但我有同樣的錯誤。 – user2120596