• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jcaptcha doesnt work in java 1.5

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have added jcaptcha in a jsp page. I compiled the prject using java 6. But when i create a project using java 5.It gives exception doesnt work. Bad version number in .class file

java.lang.UnsupportedClassVersionError: Bad version number in .class file. How this can be fixed.

I revereted bak to another jar it seems and old version now i am getting black and whit captcha.How can this be made into beautiful ones as in new version.

I use following code

// create the image with the text
BufferedImage bi = service.getImageChallengeForID(httpServletRequest.getSession(true).getId());





ServletOutputStream out = httpServletResponse.getOutputStream();




Thanks
Abhilash
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're using an older JVM to execute the code than you're using to compile it. Code compiled in Java 6 needs at least a Java 6 JVM - you can't run it on a Java 5 JVM.
 
Abhi Venu
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks for the reply. My doubt is that how to get this same look and feel of new version jcaptcha even if use java 5
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic