![](/img/trans.png)
[英]Signer information does not match signer information of other classes in the same package
[英]class “SynchronousHelper”'s signer information does not match signer information of other classes in the same package
我已经知道关于此还有其他主题,但是我找不到解决问题的答案。 我已经下载了morena的软件包以使用Twain和WIA api,因为我需要制作一个使用本地扫描程序进行文档扫描的java应用程序。 我有一个罐子,其中包含我需要的所有类,并且已将其正确放置在项目文件夹中(我使用net bean进行编程),并且已经完成了一个测试应用程序,该应用程序允许使用我的epson扫描仪并进行扫描。 当我运行此错误时,将出现:线程“ main”中的异常java.lang.SecurityException:类“ SynchronousHelper”的签名者信息与同一包中其他类的签名者信息不匹配。
在其他主题中,一些用户建议打开清单并删除所有签名,但是当我这样做时,net bean会标记错误,因为没有签名。 有人有主意吗? 抱歉,如果有一些语法错误,但我是意大利人。 谢谢大家。
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);
}
}
SynchronousHelper.java文件应该位于示例中下载的morena文件夹中。 您可以将其添加到项目中,或从那里复制所需的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.