在swt中获取jar包中的文件 uri is not hierarchical

时间:2023-03-08 19:39:29
在swt中获取jar包中的文件 uri is not hierarchical

uri is not hierarchical

学习了:http://blog.csdn.net/zdsdiablo/article/details/1519719

在swt中获取jar包中的文件:

Image backgroundImage = null;
try {
backgroundImage = new Image(Display.getCurrent(), this.getClass().getResourceAsStream("login.jpg"));
} catch (Exception e) {
e.printStackTrace();
System.out.println("Error: Background drawing failed !");//背景图加载失败!
}