Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Bytecode not optimized

Posted on 2005-05-04
6
Medium Priority
?
272 Views
Last Modified: 2012-05-05
Hello.

Many decompilers can recover source code from bytecodes, but not always it is equal to original source code because the compilation process made several optimizations.

I’d like to control the compilation process for getting bytecode as closed as original source code (without optimizations for loops). Is it possible? Has javac an option to do that or there is another tool?

Regards.
0
Comment
Question by:ujuarez71
  • 4
  • 2
6 Comments
 
LVL 15

Expert Comment

by:aozarov
ID: 13931047
Try:
javac -g:-g:lines,vars,source ...
0
 
LVL 15

Accepted Solution

by:
aozarov earned 200 total points
ID: 13931065
Sorry:
javac -g:lines,vars,source   ...
This put in the class as much information to ease the process of debugging and enable better matching of class->src
0
 

Author Comment

by:ujuarez71
ID: 13931370
This works very well. Are lines,vars,source all the values for -g option?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:aozarov
ID: 13931387
Yes.
To see it run javac without any arguments and you will get the list.
0
 

Author Comment

by:ujuarez71
ID: 13931412
Thank you!
0
 
LVL 15

Expert Comment

by:aozarov
ID: 13931453
You are welcome :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question