Azureus因NoClassDefFoundError失败:无法初始化类org.eclipse.swt.internal.cairo.Cairo

时间:2015-07-08 16:49:49

标签: java ubuntu swt

在最近的Linux Mint更新之后,即libservlet3.0-java,启动Azureus会产生此输出(并且Azureus无法启动):

file:/usr/lib/jni/ ; file:/usr/lib/java/ ; file:/usr/share/java/Azureus2.jar ; file:/usr/share/java/log4j-1.2-1.2.17.jar ; file:/usr/share/java/commons-cli-1.2.jar ; file:/usr/lib/java/swt-gtk-3.8.2.jar ; file:/home/saran/
changeLocale: *Default Language* != English (United States). Searching without country..
changeLocale: Searching for language English in *any* country..
changeLocale: no message properties for Locale 'English (United States)' (en_US), using 'English (default)'
UIFunctions/ImageLoad took 25ms
ImageRepository:loadImage:: Resource not found: org/gudy/azureus2/ui/icons/a16.png
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
  no swt-cairo-gtk-3836 in java.library.path
  no swt-cairo-gtk in java.library.path
  Can't load library: /usr/lib/jni/libswt-cairo-gtk-3836.so
  Can't load library: /usr/lib/jni/libswt-cairo-gtk.so
  Can't load library: /home/saran/.swt/lib/linux/x86_64/libswt-cairo-gtk-3836.so
  Can't load library: /home/saran/.swt/lib/linux/x86_64/libswt-cairo-gtk.so

ImageRepository:loadImage:: Resource not found: org/gudy/azureus2/ui/icons/a16.png
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.swt.internal.cairo.Cairo
DEBUG::Wed Jul 08 18:25:54 CEST 2015::com.aelitis.azureus.ui.swt.shells.main.MainWindowImpl::createWindow::802:
    MainWindowImpl::access$000::117, MainWindowImpl$4::runSupport::273, AERunnable::run::35, Utils::execSWTThread::749, Utils::execSWTThread::873, MainWindowImpl::<init>::269, MainWindowFactory::createAsync::63, Initializer::runInSWTThread::270, SWTThread::<init>::281, SWTThread::createInstance::61, Initializer::<init>::158, NativeConstructorAccessorImpl::newInstance0::-2, NativeConstructorAccessorImpl::newInstance::57, DelegatingConstructorAccessorImpl::newInstance::45, Constructor::newInstance::526, Main::<init>::111, Main::main::328, NativeMethodAccessorImpl::invoke0::-2, NativeMethodAccessorImpl::invoke::57, DelegatingMethodAccessorImpl::invoke::43, Method::invoke::606, Main::directLaunch::226, Main::main::129, NativeMethodAccessorImpl::invoke0::-2, NativeMethodAccessorImpl::invoke::57, DelegatingMethodAccessorImpl::invoke::43, Method::invoke::606, MainExecutor$1::run::34, Thread::run::745
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.swt.internal.cairo.Cairo
  at org.eclipse.swt.graphics.Image.init(Image.java:1285)
  at org.eclipse.swt.graphics.Image.<init>(Image.java:200)
  at com.aelitis.azureus.ui.swt.imageloader.ImageLoader.getNoImage(ImageLoader.java:856)
  at com.aelitis.azureus.ui.swt.imageloader.ImageLoader.parseValuesString(ImageLoader.java:253)
  at com.aelitis.azureus.ui.swt.imageloader.ImageLoader.getImages(ImageLoader.java:704)
  at com.aelitis.azureus.ui.swt.imageloader.ImageLoader.getImage(ImageLoader.java:717)
  at org.gudy.azureus2.ui.swt.Utils.setShellIcon(Utils.java:641)
  at com.aelitis.azureus.ui.swt.shells.main.MainWindowImpl.createWindow(MainWindowImpl.java:530)
  at com.aelitis.azureus.ui.swt.shells.main.MainWindowImpl.access$000(MainWindowImpl.java:117)
  at com.aelitis.azureus.ui.swt.shells.main.MainWindowImpl$4.runSupport(MainWindowImpl.java:273)
  at org.gudy.azureus2.core3.util.AERunnable.run(AERunnable.java:35)
  at org.gudy.azureus2.ui.swt.Utils.execSWTThread(Utils.java:749)
  at org.gudy.azureus2.ui.swt.Utils.execSWTThread(Utils.java:873)
  at com.aelitis.azureus.ui.swt.shells.main.MainWindowImpl.<init>(MainWindowImpl.java:269)
  at com.aelitis.azureus.ui.swt.shells.main.MainWindowFactory.createAsync(MainWindowFactory.java:63)
  at com.aelitis.azureus.ui.swt.Initializer.runInSWTThread(Initializer.java:270)
  at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:281)
  at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:61)
  at com.aelitis.azureus.ui.swt.Initializer.<init>(Initializer.java:158)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
  at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:111)
  at org.gudy.azureus2.ui.swt.Main.main(Main.java:328)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at org.gudy.azureus2.ui.common.Main.directLaunch(Main.java:226)
  at org.gudy.azureus2.ui.common.Main.main(Main.java:129)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:606)
  at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:34)
  at java.lang.Thread.run(Thread.java:745)
[alert] Alert:3:Error Initialize MainWindow

如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

基于an old bug (from 2008)我已经能够让Azureus重新开始工作。

解决方案:安装libswt-cairo-gtk-3-jni包。

我机器上的

版本:

  • Azureus:5.6.1.2-1~getdeb1,
  • libservlet3.0-java:7.0.52-1ubuntu0.3,
  • libswt-cairo-gtk-3-jni:3.8.2-3