com.mongodb cannot be resolved to a type
<p>I am trying to work with mongoDB and Java. I can't make Java get the resources to use MongoDB.</p>

<p>I have downloaded the MongoDB Java Drivers as well as the BSONS files and added both jars into the build path. Tried with the Driver 3.0.4 and the 3.3.0 versions of the MongoDB Java Driver but none works, and i still get the dreaded:</p>

<pre><code>The import com.mongodb.BasicDBObject cannot be resolved
</code></pre>

<p>That goes for every import from the com.mongodb package.</p>

<p>I have checked the compatibility <a href="https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/" rel="nofollow"> here </a> and downloaded the drivers from <a href="https://mongodb.github.io/mongo-java-driver/" rel="nofollow"> here</a>.</p>

<p>I am only trying to make simple test so connecting to a Database on localhost will suffice.</p>

<p>The only thing I can think of is the dependencies on Maven? I don't really understand or know what that it is but every guide, tutorial or any source material I have looked does not mention it so I don't think it's that.</p>