Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse not finding jar file(External jar file added to project, but imports from the jar file show errors)
Eclipse not finding jar file [message #1827788] Sat, 23 May 2020 19:25 Go to next message
Jim Anderson is currently offline Jim AndersonFriend
Messages: 78
Registered: October 2014
I have been away from Eclipse and java for a bit working on other projects so I am a bit rusty with Eclipse. I started a new project the other day using:

Eclipse IDE for Java Developers Version: 2020-03 (4.15.0) Build id: 20200313-1211

I have the following important statements in my java file:

import org.json.simple.JSONObject;
import org.json.simple.JSONArray;
import org.json.simple.parser.ParseException;
import org.json.simple.parser.JSONParser;

The error for the first import statement above is:
The type org.json.simple.JSONObject is not accessible

In the project properties, I have added the external library:

and if I look at the project in the "Project Explorer" tab, it shows that the jar is included in the "Referenced Libraries" for the project, so I think the import statements should be error free.

Does anyone have an ideas on what I am doing wrong?

Jim A.
Re: Eclipse not finding jar file [message #1827798 is a reply to message #1827788] Sun, 24 May 2020 13:58 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1828
Registered: July 2009
Senior Member
I have the following important statements in my java file:

important? :)

The type org.json.simple.JSONObject is not accessible

Assuming that your project has a compliance of "9" or greater, this error message indicates, that the compiler finds the type, but the rules of the Java Platform Module System don't allow access to it.
Previous Topic:JAR File Import Problem
Next Topic:Error at update
Goto Forum:

Current Time: Tue Oct 27 07:39:51 GMT 2020

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

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

Back to the top