View Single Post
  #1  
Old 08.11.2011, 16:07
fcpt
Guest
 
Posts: n/a
Default Captcha problem using openjdk 7 runtime

Hi,
My JDownloader version is:


I used the oracle jre7 until today, now I'm using the distro maintained openjdk7 and I have problem in captchas:
Code:
Exception in thread "JD-StartDownloads" java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException
	at jd.captcha.JAntiCaptcha.createLetterDBFormMTH(JAntiCaptcha.java:567)
	at jd.captcha.JAntiCaptcha.loadMTHFile(JAntiCaptcha.java:1482)
	at jd.captcha.JAntiCaptcha.<init>(JAntiCaptcha.java:289)
	at jd.controlling.CaptchaController.getCode(Unknown Source)
	at jd.plugins.PluginForHost.getCaptchaCode(Unknown Source)
	at jd.plugins.PluginForHost.getCaptchaCode(Unknown Source)
	at jd.plugins.PluginForHost.getCaptchaCode(Unknown Source)
	at jd.plugins.PluginForHost.getCaptchaCode(Unknown Source)
	at jd.plugins.hoster.MegasharesCom.handleFree(MegasharesCom.java:234)
	at jd.plugins.PluginForHost.handle(Unknown Source)
	at jd.controlling.SingleDownloadController.handlePlugin(Unknown Source)
	at jd.controlling.SingleDownloadController.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.ImageFormatException
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 12 more
Could JDownloader use javax.imageio instead.

_________________________________________________________
TESTED AT THE SVN LATEST REVISION!


Files affected Captcha.java and PixelGrid.java

import javax.imageio.ImageIO;

replace in both files:
Code:
            JPEGImageEncoder jpeg = JPEGCodec.createJPEGEncoder(fos);
            jpeg.encode(bimg);
with:
Code:
ImageIO.write(bimg, "jpg", fos);

Last edited by Jiaz; 09.11.2011 at 08:35.
Reply With Quote