2

This may sound like a stupid question, but how can I start to use lambdaj library? I downloaded the lambdaj.jar and put it in the lib directory in my webapp together with other jar files. But I can't import any of the classes. Do I need to build the jar using maven? Thanks in advance!

David

Mario Fusco
  • 13,548
  • 3
  • 28
  • 37
David Zhao
  • 4,284
  • 11
  • 46
  • 60
  • And consider using the lambdaj-2.0-with-dependencies.jar – jitter Oct 17 '09 at 08:31
  • Adding it to `WEB-INF/lib` is sufficient to add it to your runtime classpath, but you will also need it to be present on your build class path so that your development tools can see it. How you do this depends on what tools you are using. Eclipse? NetBeans? IntelliJ? Javac at the command line? – Simon Nickerson Oct 17 '09 at 09:09
  • Yes, now I realized after adding the jars to the WEB-INF/lib directory, I also need to add the jars to the Eclipse java project libraries list. Now I can use the library. I've been taking IDE for granted, can't code without it now. Thanks guys! – David Zhao Oct 18 '09 at 04:41

2 Answers2

4

Just add it to the rest of your libraries for compilation and you need to package it with the rest of jars when building/packaging.

non sequitor
  • 18,296
  • 9
  • 45
  • 64
2

You also need to add the jar to the CLASSPATH.

rics
  • 5,494
  • 5
  • 33
  • 42