class" SynchronousHelper"的签名者信息与同一包中其他类的签名者信息不匹配

时间:2014-03-14 08:41:43

标签: java package signer

我已经知道有关于此的其他主题但我无法找到问题的答案。 我已经下载了Morena的软件包以使用Twain和WIA api,因为我需要创建一个使用本地扫描程序进行文档扫描的java应用程序。 我有一个单独的jar包含我需要的所有类,我已经把它放在我的项目文件夹中(我使用net bean编程),我做了一个测试应用程序,允许使用我的epson扫描仪并进行扫描。 当我运行时出现此错误:线程“main”中的异常java.lang.SecurityException:类“SynchronousHelper”的签名者信息与同一包中其他类的签名者信息不匹配。

在其他主题中,一些用户建议打开清单并删除所有签名,但是当我这样做时,net beans标记错误,因为没有签名。 有人有想法吗? 对不起,如果有一些语法错误,但我是意大利人。 谢谢大家。

import eu.gnome.morena.*;
import java.awt.image.BufferedImage;
import java.util.List;

public class main {
    public static void main(String[] args) throws Exception {
      Manager manager = Manager.getInstance();
       //Vector that contains the references to all my local scanners
       List<? extends Device> devices = manager.listDevices();
        //the position [0] contains my epson scanner
     Device device = (Device) devices.get(0);
     if (device instanceof Scanner) {

     Scanner scanner = (Scanner) device;
     scanner.setMode(Scanner.RGB_8);
     scanner.setResolution(75);
     scanner.setFrame(100, 100, 500, 500);

     } else if (device instanceof Camera) {

     }

     //SynchronousHelper--> the class that make problems 
     BufferedImage bimage = SynchronousHelper.scanImage(device);


    System.out.println("Informazioni del file scannerizzato: dimensioni=(" +              bimage.getWidth() + ", " + bimage.getHeight() + ")   bit mode=" + bimage.getColorModel().getPixelSize());
     Thread.sleep(30000);
}
}

1 个答案:

答案 0 :(得分:4)

SynchronousHelper.java文件应该位于您在示例下载的morena文件夹中。您可以将其添加到项目中,或从那里复制所需的方法。

相关问题