windows 如何创建一个 jmagick 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5163596/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to create a jmagick application
提问by rahul the great
I'm very new to jmagick. Can anyone help me out how to start a jmagick simple application ?
我对 jmagick 很陌生。任何人都可以帮助我如何启动一个 jmagick 简单应用程序?
回答by armandino
java.lang.NoClassDefFoundError: Could not initialize class magick.ImageInfo
java.lang.NoClassDefFoundError: Could not initialize class magick.ImageInfo
means that jmagick.jar is not on your CLASSPATH
. You need to add it to the CLASSPATH
.
意味着 jmagick.jar 不在您的CLASSPATH
. 您需要将其添加到CLASSPATH
.
In addition, you also need to install ImageMagick. It's the native library that does all the work. After installation you will need to set LD_LIBRARY_PATH
environment variable that points to the location where ImageMagick was installed. The setup depends on what OS you're using. There are detailed instructionson the wiki. For a code example, see the link provided by Andrew. This should get you started.
此外,您还需要安装ImageMagick。它是完成所有工作的本机库。安装后,您需要设置LD_LIBRARY_PATH
指向 ImageMagick 安装位置的环境变量。设置取决于您使用的操作系统。维基上有详细的说明。有关代码示例,请参阅 Andrew 提供的链接。这应该让你开始。