Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » [Resolved]class is not accessible (Eclipse IDE 2020-09)(older jar files are not accessible)
[Resolved]class is not accessible (Eclipse IDE 2020-09) [message #1836027] Fri, 18 December 2020 13:36 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
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

Re: class is not accessible (Eclipse IDE 2020-09) [message #1836031 is a reply to message #1836027] Fri, 18 December 2020 14:48 Go to previous message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 109
Registered: October 2014
Senior Member
Problem solved. I went to:

Project --> Properties --> Java Compiler and changed the compiler compliance from Java 11 to 1.8
Previous Topic:Export tasks
Next Topic:Project imported from git on 2020-12 doesn't know it's a java project
Goto Forum:
  


Current Time: Fri Apr 19 01:19:42 GMT 2024

Powered by FUDForum. Page generated in 0.01284 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top