{"id":16,"date":"2004-02-11T14:12:58","date_gmt":"2004-02-11T04:12:58","guid":{"rendered":"http:\/\/www.thunderguy.com\/plusplus\/20050421\/16\/"},"modified":"2005-04-22T11:01:31","modified_gmt":"2005-04-22T01:01:31","slug":"java-stack-trace-with-line-numbers","status":"publish","type":"post","link":"https:\/\/thunderguy.com\/semicolon\/2004\/02\/11\/java-stack-trace-with-line-numbers\/","title":{"rendered":"Java stack trace with line numbers"},"content":{"rendered":"<p>Often in Java program stack trace, you will see some stack frames include a source line number, while some only say &#8220;compiled code&#8221;. This is because the stack frames without line numbers have been compiled by the <abbr title=\"Just In Time\">JIT<\/abbr> compiler, and the JIT compiler obliterates line number information when it compiles code.<\/p>\n<p>To ensure that source line numbers always appear in stack traces, disable the JIT compiler by running your program with<\/p>\n<pre class=\"code\">\r\n<code>java -Djava.compiler=NONE <em>blahblahblah...<\/em><\/code>\r\n<\/pre>\n<p>Now stack traces will show line numbers for each stack frame.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often in Java program stack trace, you will see some stack frames include a source line number, while some only say &#8220;compiled code&#8221;. This is because the stack frames without line numbers have been compiled by the JIT compiler, and the JIT compiler obliterates line number information when it compiles code. To ensure that source [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[4,7],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","tag-java","tag-testing"],"_links":{"self":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":0,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thunderguy.com\/semicolon\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}