views:

12

answers:

1

Hello!

I'm using J9 VM to run my application on a Linux machine (BusyBox). When developing and testing on my Windows environment, also with J9, I get full debug information on stack traces. That doesn't happen on the Linux machine.

I've checked both VMs configuration as much as my knowledge permits. Also, I've stripped my windows J9 installation of libraries which are not on the Linux J9 Installation.

Does anyone have any idea how to get the debug info instead of "Unknown Source"? Is there any configuration for having this information printed?

Windows Output:

>j9 -jcl:foun11 Test
java.lang.Exception
        at Test.doStuff(Test.java:6)
        at Test.main(Test.java:11)

Linux Output:

#j9 -jcl:foun11 Test
java.lang.Exception
        at Test.doStuff(Unknown Source)
        at Test.main(Unknown Source)

(Both outputs refer to the same Test.class, compiled with -g:lines,vars,source.)

Thanks!

A: 

According with this piece of documentation the following option can be used to show the missing information:

-Xlinenumbers
Displays line numbers in stack traces for debugging. See also -Xnolinenumbers. By default, line numbers are on.

Apparently, by default, the line numbers are off. But, as the document states, the option is "nonstandard and subject to change without notice." It will work for now.

Hope this answer is useful to anyone in the future.

David Santos