RanZilber
RanZilber

Reputation: 1930

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,

Upvotes: 1

Views: 4721

Answers (2)

Stephen C
Stephen C

Reputation: 719309

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.

Upvotes: 4

President James K. Polk
President James K. Polk

Reputation: 42009

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

Upvotes: 1

Related Questions