简体   繁体   中英

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. And this is only a potential optimization to turn off ... because for later JVMs the optimization is mandatory.

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.

There does not seem to be much in the way of optimization to worry about. This page lists the eclipse java compiler options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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