-1

I want to use trove collections for my project but I was unable to use them by adding the jar file. https://bitbucket.org/robeden/trove/downloads

Can someone tell me how to use trove collections in my project?

LisaMM
  • 675
  • 1
  • 16
  • 28
Cmen535
  • 25
  • 1
  • 3
  • 15
  • 1
    What kind of project do you use? maven, gradle, a freeform, ... – SubOptimal Mar 10 '15 at 15:41
  • Sorry for the late reply. A simple Java project – Cmen535 Mar 10 '15 at 16:07
  • @Cmen535 simple java project shall have some build system maven or gradle... if you know what those are, you can add that dependency with just few lines... Please dont add that to classpath manually its 2015!!! – vach Mar 10 '15 at 16:09

2 Answers2

2

Don't use trove-3.0.3-src.jar (this is source, not the binaries), instead use trove-3.0.3.jar from the "lib" directory. That should be placed in your classpath in whatever manner is appropriate for your development environment.

As has been mentioned, you can also download from Maven Central using Maven or Gradle (group: net.sf.trove4j artifact: trove4j).

Rob Eden
  • 362
  • 2
  • 7
  • Cool. I sincerely thank you for your answer. I don't have minimum reputation to up-vote the answer,but thank you for help. – Cmen535 Mar 10 '15 at 18:54
  • No worries. You can definitely use it without Maven, BTW. Just use "-cp" (or "-classpath") on the "java" command line and point to the jar. Good luck! – Rob Eden Mar 11 '15 at 20:00
0

If you use Eclipse you can add external jar in project properties.

WildCherryCandy
  • 53
  • 1
  • 1
  • 9
  • I don't have a properties file .(I am beginner,Please dont mind if I am wrong.) – Cmen535 Mar 10 '15 at 16:10
  • Which IDE do you use? – WildCherryCandy Mar 10 '15 at 16:13
  • Adding the external Jar to the project didn't helped me, that is the problem – Cmen535 Mar 10 '15 at 16:14
  • You can try build it with maven. http://mvnrepository.com/artifact/net.sf.trove4j/trove4j/3.0.3 . I read about trove 3.0.3. It depends on trove 2.0. Maven can help you i think – WildCherryCandy Mar 10 '15 at 16:28
  • Is it possible to use trove library with out using build tools..All that I need is to test a class I wrote for testing the performance of trove collections. – Cmen535 Mar 10 '15 at 16:31
  • If you are begginer you should get used to maven. It is very useless tool. Sorry for my bad English. – WildCherryCandy Mar 10 '15 at 16:44
  • I tried using Maven..It works.!! Thank you. But there should be a way to use it without Maven.When I was able to use all the jar files with out maven,why cant I use this. – Cmen535 Mar 10 '15 at 16:56