Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java环境配置 #53

Closed
makeecat opened this issue Dec 9, 2016 · 1 comment
Closed

Java环境配置 #53

makeecat opened this issue Dec 9, 2016 · 1 comment

Comments

@makeecat
Copy link

makeecat commented Dec 9, 2016

使用docker安装后提交java代码显示
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create new native t...

代码:
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
while(in.hasNext())
{
int a = in.nextInt();
int b = in.nextInt();
System.out.println(a+b);
}
}
}

@makeecat
Copy link
Author

发现是由于服务器内存只有1G然后run_program里面对于Java 的Xms和Xmx设置为1G。只要修改那两个就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant