{"id":623,"date":"2009-08-19T17:01:30","date_gmt":"2009-08-19T17:01:30","guid":{"rendered":"http:\/\/www.haydnwilliams.com\/blog\/?p=623"},"modified":"2022-04-11T21:49:03","modified_gmt":"2022-04-11T20:49:03","slug":"java-cannot-find-symbol-error","status":"publish","type":"post","link":"https:\/\/www.haydnwilliams.com\/blog\/java-cannot-find-symbol-error\/","title":{"rendered":"Java &quot;Cannot find symbol&quot; error"},"content":{"rendered":"<p>I&#8217;ve just tried compiling a project exported from one of our repositories. The export included some .class files, and when I tried to compile the project in Eclipse I got multiple error messages along the lines of:<\/p>\n<p><code>cannot find symbol<\/code><br \/>\nAlthough this can be a classpath issue, I also found an <a href=\"http:\/\/www.coderanch.com\/t\/402221\/Beginning-Java\/java\/Compiler-Error-cannot-find-symbol\">interesting tip<\/a> on a random forum. It essentially states that if you end up in a situation where existing .class files are older than your current source <em>but have a newer file timestamp<\/em>, you can get the above error.<\/p>\n<p><strong>The solution:<\/strong> delete any existing .class files and re-compile. It worked for me.  :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just tried compiling a project exported from one of&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[50,57,64,148],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-it","tag-cannot-find-symbol","tag-classpath","tag-compile","tag-java"],"_links":{"self":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/comments?post=623"}],"version-history":[{"count":0,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/posts\/623\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/media?parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/categories?post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.haydnwilliams.com\/blog\/wp-json\/wp\/v2\/tags?post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}