【问题标题】:class "SynchronousHelper"'s signer information does not match signer information of other classes in the same package“SynchronousHelper”类的签名者信息与同一包中其他类的签名者信息不匹配
【发布时间】:2014-10-09 07:02:22
【问题描述】:

我已经知道还有其他关于此的主题,但我找不到我的问题的答案。 我已经下载了 morena 的包来使用 Twain 和 WIA api,因为我需要制作一个使用本地扫描仪进行文档扫描的 java 应用程序。 我有一个包含我需要的所有类的单个 jar,并且我已将其正确放入我的项目文件夹中(我使用 net beans 进行编程),并且我已经完成了一个允许使用我的 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);
}
}

【问题讨论】:

标签: java package signer


【解决方案1】:

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

【讨论】:

  • 谢谢!这在他们的文档中不是很明显!
猜你喜欢
  • 1970-01-01
  • 2014-08-14
  • 1970-01-01
  • 2020-05-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-08-14
  • 1970-01-01
相关资源
最近更新 更多