ITeye博客

eclipse RCP 开发中的程序参数使用

chenqisdfx · 2018-09-10 19:32 · eclipse · 开源软件 · Markdown

在使用eclipse进行rcp开发时等,如果需要配置自定义程序参数,可以在eclipse运行配置窗口的arguments中写入。

 

在使用时,win系统

Object x = properties.get("eclipse.commands");
        String string = x.toString();
        String str = "-selfcq\n";
        int indexOf = string.indexOf(str);
        indexOf += str.length();
        int indexOf2 = string.indexOf("\n", indexOf);
        String ss = string.substring(indexOf, indexOf2);
        System.out.println(ss);// 指定的名称selfcq下的参数值ss

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。