简体   繁体   English

如何删除java eclipse中的编译器优化?

[英]how to remove compiler optimizations in java eclipse?

as titles says , 如标题所述,

i'd to take optimizations off because i want to create a bytecode ,class file, that will be an input to other program. 我想取消优化,因为我想创建一个字节码类文件,它将作为其他程序的输入。 This class file will be used for testing the program , and is assumed to be unoptimized. 此类文件将用于测试程序,并且假定未经过优化。

thanks, 谢谢,

As far as I can tell, there is only one (potential) compiler optimizations to turn off. 据我所知,只有一种(潜在的)编译器优化可以关闭。 That is the optimization that inlines the JSRs used by older compilers to reduce code size for finally clauses. 这是优化的方法,可以内联由较早的编译器使用的JSR,以减少finally子句的代码大小。 And this is only a potential optimization to turn off ... because for later JVMs the optimization is mandatory. 这只是关闭的潜在优化方法,因为对于以后的JVM,此优化是强制性的。

See this link for details. 有关详细信息,请参见此链接

Apart from that, there are no bytecode optimizations that you can turn off. 除此之外,没有可以关闭的字节码优化。 But don't worry ... most of the serious optimizations are performed by the JIT compiler. 但是不用担心,大多数严肃的优化都是由JIT编译器执行的。

There does not seem to be much in the way of optimization to worry about. 优化似乎没有太多需要担心的方式。 This page lists the eclipse java compiler options. 本页列出了Eclipse Java编译器选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM