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

相关推荐
小池先生15 小时前
Gradle vs Maven 详细对比
java·maven
q***239215 小时前
基于SpringBoot和PostGIS的云南与缅甸的千里边境线实战
java·spring boot·spring
q***787816 小时前
Spring Boot的项目结构
java·spring boot·后端
q***965816 小时前
Spring Data JDBC 详解
java·数据库·spring
Kuo-Teng16 小时前
LeetCode 118: Pascal‘s Triangle
java·算法·leetcode·职场和发展·动态规划
倚肆16 小时前
HttpServletResponse 与 ResponseEntity 详解
java·后端·spring
悟能不能悟16 小时前
java List怎么转换为Vector
java·windows·list
yaoxin52112316 小时前
241. Java 集合 - 使用 Collections 工厂类处理集合
java·windows
依_旧16 小时前
【玩转全栈】----Django基本配置和介绍
java·后端
white-persist16 小时前
差异功能定位解析:C语言与C++(区别在哪里?)
java·c语言·开发语言·网络·c++·安全·信息可视化