[Resolved]class is not accessible (Eclipse IDE 2020-09) [message #1836027] |
Fri, 18 December 2020 13:36 |
Jim Anderson Messages: 109 Registered: October 2014 |
Senior Member |
|
|
One of the nice features of java has been that new releases have been backward compatible with jar files created with an older version of the java compiler. Recently, I was working on a java program and I got a message that one of the class files was "inaccessible". In a different forum, someone point out to me that the class in question was an older release. Sure enough I got an updated version of the jar file and my program ran.
I recently installed Eclipse jee 2020-09 and got it running. Unfortunately, the install somehow got corrupted and I had to remove it. I have now reinstalled it. I'm not sure why I am running into a problem now since it is the identical release as the one I just removed, but I am now getting many error messages about my import statements, with errors like "javax.servlet.http.HttpServletRequst is not accessible". The impact is that many jar files that I have downloaded in the past, cannot be used.
What steps do I take to move my source code to compile and work in Eclipse? I don't think it matters if I use the java 1.8 or java 13 to compile my code, but for some reason Eclipse is now balking at older jar files that I have imported.
I am in the process off moving from java 1.8 (52) to java 13 (57), but things have not gone smoothly. I'm curious why the java developers broke what I thought was a gold rule, i.e. working code in older compiler releases should continue to work when run with a later compiler version. I plan to investigate some.
[Updated on: Fri, 18 December 2020 14:48] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01284 seconds