如图,eclipse中我的包结构为:,我在 spt.app.MainFrame 中可以通过一下代码段使用资源:

public static Object obj = ImageIconProxy.class.getClassLoader().getResource("img/absent.png");

但是我们不能在A类中,引用别的类声明类似上面的方法,例如,我们再 spt.proxy.ImageIconProxy 类中声明:

public static Object obj = ImageIconProxy.class.getClassLoader().getResource("img/absent.png");

然后再 spt.app.MainFrame 中引用:Object obj = ImageIconProxy.obj; //这样是无法获取到的.

最新文章

  1. 微软新神器-Power BI横空出世,一个简单易用,还用得起的BI产品,你还在等什么???
  2. ExtJS in Review - xtype vs. alias
  3. IO多路复用及ThreadingTCPServer源码阅读
  4. 20145209&20145309信息安全系统设计基础实验报告 (5)
  5. Mono.Posix.dll文件
  6. Unity3D面试题汇总
  7. 【ArcGIS二次开发】CreateFeature报错(HRESULT E_FAIL)
  8. PHP strrpos strpos strstr strrchr 区别
  9. unity3d脚本编程
  10. Unity学习笔记(4):依赖注入
  11. Kafka的消息格式
  12. Android自动化测试介绍
  13. Perl中检测标准输入使用的字符集
  14. CentOS 6.4 配置 Hadoop 2.6.5
  15. MySQL 存储过程 if语句
  16. spring 装配
  17. 剑指Offer_编程题_1
  18. pyqt5-顶层窗口特定操作-图标和标题和不透明度
  19. 启动docker容器时的Error response from daemon: devmapper: Error mounting: invalid argument. 错误解决
  20. python:推导式套路

热门文章

  1. Fibonacci Tree
  2. 5个提升Google Chrome浏览器运行速度的技巧
  3. 【Xamain 跨平台机制原理剖析】
  4. HashMap大小选择
  5. 查看TEMP使用情况
  6. 依据 smtp协议的简单golang 的发邮件实现
  7. Quality in the Test Automation Review Process and Design Review Template
  8. Unity5 Screen-Space Subsurface Scattering屏幕空间次表面散射SSSSS
  9. HDOJ1181变形课 深搜回溯
  10. html/php, 二个文本框求和,在第三个框中显示