简体   繁体   中英

Install MongoDb Driver in Netbeans

I have installed the MongoDb Plugin in NetBeans.

I found the quickstart guide here: http://mongodb.github.io/mongo-java-driver/2.13/getting-started/quick-tour/

When I try to use the imports NetBeans can not find them. In Visual Studio I would just use the NuGet Package manager. What do I have to do in NetBeans?

The dependencies XML where would that go?

Have you included the external JARs in NetBeans?

Hover your mouse pointer over your desired project name, and right-click . Select Properties > Libraries (found under Categories section) > Add JAR/Folder .

From the file chooser, specify the location of the JARs you downloaded, and click on Add .

Close the Properties Dialog Box, and expand the Libraries node under your project. You should be able to see the imported JARs.

Also, if you're downloading the mongodb-driver-3.xxjar file, you also need to download the bson-3.xxjar and mongodb-driver-core-3.xxjar files, and import all three in NetBeans.

I had the same issue, and had to beat my head over it for a long time. Hope my experience can help you with your issue.

PS: The version of MongoDB driver you're using is quite outdated, and the usage syntax might be deprecated in future versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM