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

相关推荐
请告诉他19 小时前
从 Struts2 单体到 Spring Cloud 微服务:一个 P2P 系统的真实重构之路(2019 年实战复盘)
java·开发语言
LYOBOYI12319 小时前
使用vscode创建qt的qml项目
ide·vscode·编辑器
这周也會开心19 小时前
Java面试题2-集合+数据结构
java·开发语言·数据结构
码农水水19 小时前
大疆Java面试被问:Spring事务的传播行为详解
java·数据库·spring
winfield82119 小时前
GC 日志全解析:格式规范 + 问题分析 + 性能优化
java·jvm
甜可儿19 小时前
mac环境安装不同版本maven
java·macos·maven
毕设源码-朱学姐19 小时前
【开题答辩全过程】以 基于SpringBoot的智慧商城系统设计与实现为例,包含答辩的问题和答案
java·spring boot·后端
无限进步_19 小时前
C++多态全面解析:从概念到实现
开发语言·jvm·c++·ide·git·github·visual studio
无限进步_19 小时前
C++ STL容器适配器深度解析:stack、queue与priority_queue
开发语言·c++·ide·windows·算法·github·visual studio
七夜zippoe19 小时前
Spring Boot自动配置魔法与@EnableAutoConfiguration原理揭秘
java·spring boot·后端·自动配置·条件注解