Intellij IDEA调整栈内存空间大小详细教程,添加参数-Xss....

测试添加参数的效果代码:

java 复制代码
package org.example;

public class Demo1 {
    static int count = 0;
    public static void main (String[] args) throws InterruptedException{
        //为什么不写String[] args就不出现运行的标识呢?
        method1();
        try{
            method();
        }
        catch (Error e){//这个是Error 用Exception无法捕捉
            System.out.println(e);
            System.out.println(count);
        }

    }

    private static void method() {
        count ++;
        method();
//        System.out.println(count);
    }


    private static void method1() {
        method2(1,2);
    }

    private static int method2(int a, int b) {
        int c = a + b;
        return c;
    }
}

添加方式如图,参数格式类似:-Xss1024k

相关推荐
hhy_smile24 分钟前
Class in Python
java·前端·python
CSDN_RTKLIB1 小时前
Visual Studio不改变文件编码情况下解决C2001
c++·ide·visual studio
qq_12498707531 小时前
基于Srpingboot心晴疗愈社平台的设计与实现(源码+论文+部署+安装)
java·数据库·spring boot·spring·microsoft·毕业设计·计算机毕业设计
大爱编程♡1 小时前
SpringBoot统一功能处理
java·spring boot·后端
leiming62 小时前
FreeRTOS 的任务与 Linux
java·开发语言
小马爱记录2 小时前
枚举策略驱动
java
马猴烧酒.2 小时前
【JAVA数据传输】Java 数据传输与转换详解笔记
java·数据库·笔记·tomcat·mybatis
爱编码的傅同学2 小时前
【常见锁的概念】死锁的产生与避免
java·开发语言
rabbit_pro3 小时前
SpringBoot3使用PostGis+GeoTools整合MybatisPlus
java·spring
望眼欲穿的程序猿3 小时前
Ai8051U+DHT11温湿度!
java·开发语言