[英]How to add command-line arguments to a Java program launched from Eclipse?
I am trying to figure out how to add the command line arguments 我试图弄清楚如何添加命令行参数
-XX:CompileCommand=print,javax/swing/text/GlyphView,getBreakSpot
to eclipse in order to fix a JIT problem documented in http://kingsfleet.blogspot.com.br/2014/11/but-thats-impossible-or-finding-out.html but i am unsure how to add this. 为了解决http://kingsfleet.blogspot.com.br/2014/11/but-thats-impossible-or-finding-out.html中记录的JIT问题而日食,但我不确定如何添加。
If this is part of building as indicated in your question's title then: You can't. 如果这是问题标题中指示的建筑物的一部分,则:您不能。 That is an argument specific to Oracle's javac.
这是Oracle的javac特有的参数。 Eclipse's Java Builder uses Eclipse's compiler.
Eclipse的Java Builder使用Eclipse的编译器。 If you use ant or any other external tool, to run Oracle's javac then you can add arguments for it.
如果使用ant或任何其他外部工具来运行Oracle的javac,则可以为其添加参数。
If this is a runtime option (since you mention the JIT), then you can add any arguments for the JRE in the Run Configuration dialog. 如果这是运行时选项(因为提到了JIT),则可以在“ 运行配置”对话框中为JRE添加任何参数。
I just skimmed the article you referenced. 我只是浏览了您引用的文章。 It is an argument to 'java', not 'javac' and has nothing to do with building.
它是“ java”而不是“ javac”的参数,与构建无关。 Enter it in the Arguments tab of the Run Configuration dialog.
在“ 运行配置”对话框的“ 参数”选项卡中输入它。
It seems like you need "boot time parameters" for your Eclipse, well before the projects are loaded. 似乎在项目加载之前就需要Eclipse的“启动时间参数”。 If I have understood the question correctly, have you tried using eclipse.ini?
如果我正确理解了这个问题,您是否尝试过使用eclipse.ini? Here are a few lines from my ini file where I change some parameters.
这是我的ini文件中的几行,我在其中更改了一些参数。
--launcher.appendVmargs$
-vmargs$
-Dosgi.requiredJavaVersion=1.6$
-XX:MaxPermSize=256m$
-Xms40m$
-Xmx1524m$
-Dgrails.console.enable.interactive=false$
-Dgrails.console.enable.terminal=false$
-Djline.terminal=jline.UnsupportedTerminal$
-Dgrails.console.class=grails.build.logging.GrailsEclipseConsole$
If I havent' understood your question, please clarify, if not, hope this helps. 如果我不了解您的问题,请澄清,否则,希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.