Loading

在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 !");//背景图加载失败!
        }

 

posted @ 2017-10-10 13:53  stono  阅读(915)  评论(0编辑  收藏  举报