How to avoid the message "Unknown source"?

R

Richard

Before I used the option -classic with java but it is not supported anymore.

I would like to know the line where is the problem in my program.

Thanks in advance for your answer.

Richard
 
T

thomas_okken

Use -Djava.compiler=NONE
This will disable the JIT, which is the evildoer that discards
file/linenumber information.

- Thomas
 
R

Richard

Hello Thomas,

Nothing is changed with the option -Djava.compiler=NONE. My version of
Java : 1.5.0

Richard

(e-mail address removed) a écrit :
 
T

Thomas Okken

Perhaps your classes do not contain file/line information. If I
remember correctly, javac does emit this information by default, but
the Ant javac task does not. If you're using Ant, try invoking javac
using code like this:

<javac srcdir="src"
destdir="classes"
debug="on"
debuglevel="source,lines"/>

If you're using the javac tool, make sure you do not have -g:none on
the command line. If no -g option is present, javac will generate file
and line number information.
Hope this helps,

- Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top