A sselenium program I have been developing for a while now comes up with com.google.common.base.Predicate not found when I open it in Netbeans. It appears that some Java update has removed or changed that library. Does it have to be reinstalled or is there some replacement for it?
This class is part of the Guava library. It must be in your classpath. But libraries do not magically disappear from the classpath of a project when upgrading Java. Some one must have removed it.
This class is normally located in a jar file called something like google-*.jar
. Try to find it on your filesystem and if you do, make sure it is pointed to by the CLASSPATH
environment variable (the variable should point to the jar file, not the directory which contains it). If you don't find it in your file system, you need to download it (it's free) and then ensure the correct CLASSPATH
. Alternatively, you can use you system's package management tool to download it, in which case there is a chance it will update CLASSPATH
automatically (you may need to log out and in again or restart you shell etc to make the last change effective).
If you want to confirm the jar file you find/download contains the class, you can do something like this (Unix/Linux):
jar -tf file.jar | grep 'com.google.common.base.Predicate'
where you should substitute the name of the file you've found/downloaded for file.jar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With