刚才查找api的时候找到了 class.getResource
URL url=com.todaynic.jft.Arrstatic.class.getResource("BIG");
File big=new File(url.getPath());这样就可以得到类的组件,问题基本是解决了。但我想知道 能不能将资源文件打到jar包里面供外部程序调用呢???
URL url=com.todaynic.jft.Arrstatic.class.getResource("BIG");
File big=new File(url.getPath());这样就可以得到类的组件,问题基本是解决了。但我想知道 能不能将资源文件打到jar包里面供外部程序调用呢???
http://expert.csdn.net/Expert/topic/1916/1916904.xml?temp=.8560755
java.io.InputStream is = TestClass.class.getResourceAsStream("p.gif")
取得你的资源。