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

相关推荐
c++之路4 小时前
C++ STL
java·开发语言·c++
白晨并不是很能熬夜4 小时前
【RPC】第 4 篇:服务发现 — Zookeeper + 缓存容错
java·后端·程序人生·缓存·zookeeper·rpc·服务发现
EvenBoy4 小时前
IDEA中使用CodeX
java·ide·intellij-idea
日取其半万世不竭4 小时前
Minecraft Java版社区服搭建教程(Windows版)
java·开发语言·windows
时光之源4 小时前
Visual Studio | Marketplace创建发布者(Create Publisher)时无法创建的问题解决方案
ide·vscode·visual studio·plugin·cursor
逸Y 仙X4 小时前
文章十六:ElasticSearch 使用enrich策略实现大宽表
java·大数据·数据库·elasticsearch·搜索引擎·全文检索
小雅痞4 小时前
[Java][Leetcode middle] 15. 三数之和
java·算法·leetcode
苍煜4 小时前
Java自定义注解-SpringBoot实战
java·开发语言·spring boot
XS0301064 小时前
Java ArrayList
java·开发语言
凯尔萨厮4 小时前
Springboot2.x+JSP项目创建
java·数据库