4

What do I need to do to control whether my classes compiled with a JavaCompiler will include debug information or not?

I'm thinking it has something to do with the getTask()-method's options parameter, but I can't find any references on whether that assumption is correct to start with, and if so, what is the correct way to control that?

2 Answers 2

2

Check out http://www.javabeat.net/articles/73-the-java-60-compiler-api-1.html In JavaCompiler class there is a field to pass in the options -g is the one for debug information.

Sign up to request clarification or add additional context in comments.

Comments

1

Maybe you could search further in the "options" argument of the getTask() method, which allows to pass options to the compiler; in your case it would be some "-g:none" option as detailed in http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#options

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.