14

I wanna give a shot at developing a secure login system in Java. How should I implement CAPTCHA using Java?

stivlo
  • 83,644
  • 31
  • 142
  • 199
Flash
  • 2,901
  • 5
  • 38
  • 55
  • What kind of CAPTCHA system do you want? Word recognition; image recognition; something else? If you know how to program Java web apps generally, I don't think there's anything particularly challenging to do on the server side. What aspect are you not sure about? – Nick Jul 24 '10 at 20:32

4 Answers4

10

The three CAPTCHA libraries I've used for Java are:

  1. JCaptcha - This is the most configurable of the three, and pretty well documented. But we can't seem to get this to look right, no matter what. It also does audio and other unconventional CAPTCHAs
    JCaptcha example http://jcaptcha.sourceforge.net/samples/SimpleListImageCaptchaEngineCaptcha_0.jpg
    http://jcaptcha.sourceforge.net/

  2. SimpleCaptcha - This is reasonably configurable, and pretty well documented. I like the way this looks, but some people have trouble reading it.
    SimpleCaptcha example http://simplecaptcha.sourceforge.net/images/Captcha.jpg
    http://simplecaptcha.sourceforge.net/

  3. icaptcha - This is pretty poorly documented, but shouldn't be too hard to figure out from the examples. In our tests, we found this to be more readable than the other two (can be a good thing or a bad thing, depending on your target audience)
    icaptcha example http://icaptcha.googlecode.com/files/2_img_test.jpg
    http://code.google.com/p/icaptcha/

Our apps are Spring MVC based, and it was really easy to integrate these.

We just went with what looked best to us (icaptcha).

Jack Leow
  • 21,945
  • 4
  • 50
  • 55
8

I know it's an old question, but I would like to recommend Cage.

  • open source, Apache v2 licensed so it can be used in enterprise/proprietary projects too
  • supports maven (available from the central maven repository)
  • fast (on the test pc 3-5 msec / image)
  • small (a single, small jar, no external dependencies, only Java 1.5 or newer is needed)

captcha 1 captcha2

captcha 3 captcha 4

stivlo
  • 83,644
  • 31
  • 142
  • 199
7

SimpleCaptcha: SimpleCaptcha is a framework used in generating CAPTCHA image/answer pairs for Java (J2EE, Grails, JavaFX, etc.)

But I recommend reCaptcha

Duplicate: Recommendations for java captcha libraries

Community
  • 1
  • 1
zengr
  • 38,346
  • 37
  • 130
  • 192
0

Another captcha library with a Maven support and working Spring example: https://github.com/axet/kaptcha

Altair7852
  • 1,226
  • 1
  • 14
  • 23