Issue
I have been using Eclipse for several years without issue. I made changes to my java code as recently as last week without problem. Now, I have tried to make changes to my code and they are not reflected when I run the code. One example (and there are several) is I changed the URL I am trying to hit. I have a print statement to verify the variable is getting the correct information. It still reflects the old code.
I thought something may be cached somewhere, so I booted the server, but the problem persists. I tried removing some old projects just in case there was corruption from them, but the problem persists. There are a couple of references to this happening to others, but they always involve Tomcat or some other app I'm not using. My setup is just eclipse with java. My version is Mars.2 Release 4.5.2.
Solution
I am not sure what became corrupted. I attempted 1. export projects to a .zip file. 2. delete the workspace 3. open eclipse 4. close eclipse 5. open eclipse 6. import projects
This did not resolve the issue. Someone asked for the code where I see the problem. It was several places, but one example is
// String fileURL = "ftp://www.websiteIDoNotWant" + path;
String fileURL = "http://websiteIDoWant" + path;
System.out.println("FileDownloader, fileURL: " + fileURL);
The output I got was FileDownloader, fileURLftp://www.websiteIDoNotWant/2012/020/rkpt/rkpt0200.12d.Z
So, what ended up working was creating a new Maven project with new classes and copying the code one class at a time and pasting it into the new project. Whatever was caching the old code is not present in the new project. I will delete the old one and move forward.
Answered By - Iakona
Answer Checked By - David Marino (JavaFixing Volunteer)