ktm5124
ktm5124

Reputation: 12123

Unable to add Guava to NetBeans libraries

I'm trying to add the Guava 18 release to a NetBeans project. I'm downloading it from their GitHub page.

But whenever I navigate in NetBeans, "Project" (right-click) -> "Properties" -> "Libraries" -> "Add JAR/Folder", I'm unable to add the Guava JAR that I downloaded.

This is strange, since I have no problem adding the Apache Commons Math JAR that I downloaded (and stored in the same folder).

Can anyone reproduce this problem, by creating a new NetBeans Project (in NetBeans 8.0.2), and trying to add the Guava JAR under Libraries?

Upvotes: 1

Views: 1262

Answers (1)

WillShackleford
WillShackleford

Reputation: 7018

Random things to try:

It should have something like:

file.reference.guava-18.0.jar=/home/shackle/Downloads/guava-18.0.jar
includes=**
jar.compress=false
javac.classpath=\
    ${file.reference.guava-18.0.jar}

You could try adding it manually if you have to.

  • Import something from guava, if you can still compile maybe it is just a display bug.

  • Create a Maven project instead, copy over your source, right-click dependencies, and add a dependency. You will need this info:

    groupId = com.google.guava
    artifactId=guava
    version=18.0

Upvotes: 1

Related Questions