Cannot import Java class

When I try to test to connect to ElasticSearch using Java API, I cannot import the Java class.
Then I try to use decomplier to check on the class file and exception is shown.
I find the same problem in window zip and linux zip.
Please advise if there is anything wrong.

Just add elasticsearch dependency with maven

Is it a must to use elasticsearch with maven?
I have already download all related jar and try to do without maven.
But it seems odd that I cannot open the class in decomplier.
If there is dependency issue, shouldn't the message like 'Class Not found' instead of 'Invalid Input File' show?

It's much easier to use a dependency manager than trying to download every single jar.

Coming back to your problem I don't know. It's more an IDE issue than anything related to elasticsearch. What I'm doing with my IDE is to ask to download sources as well.

Thanks David.
I try to use another IDE and I can finally see the missing java class in import.
But there are still some problem.

  1. There are still some java class missing.
  2. While I can import the class now, the IDE still cannot detect the method in the class.
    There are obvious issues related to the IDE, so I would like to know if you can share your environment setting (e.g. JDK version, IDE version, etc.).

I'm using IntelliJ but others are using Eclipse.
+java >= 8 (10 at this moment)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.