The moose likes Servlets and the fly likes Jcaptcha doesnt work in java 1.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Jcaptcha doesnt work in java 1.5" Watch "Jcaptcha doesnt work in java 1.5" New topic
Author

Jcaptcha doesnt work in java 1.5

Abhi Venu
Ranch Hand

Joined: Jul 09, 2009
Posts: 73

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


A table, a chair, a bowl of fruit and a violin; what else does a man need to be happy?:Einstein
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42946
    
  70
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

Joined: Jul 09, 2009
Posts: 73

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jcaptcha doesnt work in java 1.5