1

this may sound like a noob question, but it is a big problem for me. I have a file called yandex-translator-java-api-master.zip, and I tried adding that as an external JAR to my eclipse project, but the code wouldn't work; It wouldn't let me import.

This error comes up when i try to import "Translate" Translate cannot be resolved 6 quick fixes available: Create class, create constant, fix proj. setup...etc, etc.

How do i use this??? Where is the .jar i am supposed to import?

ruyili
  • 694
  • 10
  • 25

2 Answers2

1

zip archive is not the same thing as jar. First, extract jar from zip archive and then add it as dependency. Then you'll be able to import.

UPD: looking closely, I suppose you downloaded that archive from GitHub (or another VCS) and it's just sources of a library. You can not add it as a dependency, but you can, for example, just paste this code in your project's /src/main/. This is an easy solution. If you want to make things the right way, you can a) Search for a compiled library b) Create a module from downloaded sources and add it as dependency

Semyon Danilov
  • 1,753
  • 1
  • 17
  • 37
1

Download this file: enter image description here

And established it as a library. Instruction is in this answer.

Community
  • 1
  • 1
user2413972
  • 1,355
  • 2
  • 9
  • 25
  • Ok, i got the jar and added it, but the code still gives the same error i mentioned above in my question. – ruyili Sep 17 '15 at 20:16