1、参数

-Xss     指定线程最大的栈空间,整个参数也直接决定了函数可调用的最大深度

2、测试代码

private static int count;

public static void addCount()
{
    count++;
    addCount();
}
public static void main(String[] args) 
{
    //配置参数
    //-Xss5m
    
    try
    {
        addCount();
    } 
    catch (Throwable e)
    {
        System.out.println("调用的最大深度为:" + count);
        e.printStackTrace();
    }
}

3、eclipse 配置 jvm 参数,打开下面链接

http://www.cnblogs.com/fangwu/p/8376326.html

相关文章:

  • 2022-01-10
  • 2021-05-19
  • 2021-07-12
  • 2021-07-05
  • 2022-12-23
  • 2021-12-06
  • 2021-07-22
  • 2021-11-18
猜你喜欢
  • 2021-11-18
  • 2021-11-18
  • 2022-12-23
  • 2021-06-24
  • 2021-11-02
  • 2021-07-13
  • 2021-08-02
相关资源
相似解决方案