hzxie / voj

A cross-platform online judge system based on Spring MVC framework and ActiveMQ.
https://verwandlung.org
GNU General Public License v3.0
569 stars 121 forks source link

CreateProcess with ErrorCode 87 for Windows 10 #116

Closed suixin837 closed 3 years ago

suixin837 commented 3 years ago

image

hzxie commented 3 years ago

请先解决乱码的问题。

hzxie commented 3 years ago

Please also provide more information about your JDK version and OS version.

suixin837 commented 3 years ago

乱码问题如何解决 我试过了 无论怎么设置编码,都是乱码
jdk1.8 win10 64

hzxie commented 3 years ago

我自己用的英文版操作系统 我不知道怎么解决乱码问题。 本质上是因为中文版Windows使用GBK编码,但是我们的项目使用UTF-8编码。

suixin837 commented 3 years ago

好的 我试着改下系统编码

suixin837 commented 3 years ago

image 编码问题已解决 提示参数错误 我系统没有设置密码 所以system.username 和system.password为空 这个有影响吗

hzxie commented 3 years ago

你可以试一下加个密码?

suixin837 commented 3 years ago

加上密码可以了 amazing!!但是如果我不设置密码 应如何处理呢

hzxie commented 3 years ago

造成错误的原因是使用了这个函数:

https://github.com/hzxie/voj/blob/9fe4dc3cd6284b04ffc8eaa9d6935c410c129b10/judger/src/main/cpp/windows/Judger.Core.Runner.cpp#L210-L213

改成CreateProcess应该就可以了,文档请参见:https://docs.microsoft.com/en-us/windows/win32/procthread/creating-processes