JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08.11.2011, 17: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 09:35.
Reply With Quote
  #2  
Old 09.11.2011, 09:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

what exact openjdk version did you use?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 09.11.2011, 09:35
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,286
Default

thanks for the patch. i just updated sourcecode
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 20:38.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.