xuggle jar文件不能作为依赖jar

时间:2016-07-05 12:13:08

标签: java eclipse xuggler xuggle

我读到了xuggle图书馆 我试图让xuggle库作为一个jar文件工作,无需任何外部使用任何DLL文件或环境变量
我读了所有安装xuggler的错误并尝试了所有错误仍然显示

  

无法加载库:xuggle-xuggler;版本:5;

我也尝试在maven中使用xuggler并且同样的错误

if(!empty($_FILES)){
    $j = 1;                 
    foreach($_FILES as $filekey=>$fileattachments){
        foreach($fileattachments as $key=>$val){
            if(is_array($val)){
                $i = 1;
                foreach($val as $v){
                    $field_name = "multiple_".$filekey."_".$i;
                    $_FILES[$field_name][$key] = $v;
                    $i++;   
                }
            }else{
                $field_name = "single_".$filekey."_".$j;
                $_FILES[$field_name] = $fileattachments;
                $j++;
                break;
            }
        }                       
        // Unset the useless one 
        unset($_FILES[$filekey]);
    }
    foreach($_FILES as $field_name => $file){
        if(isset($file['error']) && $file['error']==0){
            $config['upload_path'] = [upload_path];
            $config['allowed_types'] = [allowed_types];
            $config['max_size'] = 100;
            $config['max_width'] = 1024;
            $config['max_height'] = 768;
            $this->load->library('upload', $config);
            $this->upload->initialize($config);

            if ( ! $this->upload->do_upload($field_name)){
                $error = array('error' => $this->upload->display_errors());
                echo "Error Message : ". $error['error'];
            }else{
                $data = $this->upload->data();
                echo "Uploaded FileName : ".$data['file_name'];
                // Code for insert into database
            }
        }
    }
}
  

引起:java.lang.UnsatisfiedLinkError:no xuggle-xuggler in   的java.library.path

我遵循的一些问题和答案,没有找到结果

ERROR com.xuggle.ferry.JNILibraryLoader - Could not load library: xuggle-xuggler; version: 3; Xuggle and java library path How do I have to install/configure Xuggle to not get an UnsatisfiedLinkError? Could not load library: xuggle; version: 5; Using POM

1 个答案:

答案 0 :(得分:0)

xuggler downloads page上,它谈到当前的版本为5.2(尽管在其他地方阅读让我相信5.4也是如此)。您的依赖项要求版本0.16,具有不同的地址和工件ID。

 <dependency>
   <groupId>xuggle</groupId>
   <artifactId>xuggle-xuggler</artifactId>
   <version>5.2</version>
  </dependency>

你确定你有正确的依赖吗?您是否也添加了xuggler存储库?

<repository>
   <id>xuggle repo</id>
   <url>http://xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
  </repository>

编辑:此库已被弃用。请参阅github