我怎样才能从JAR文件资源 [英] How can i get resources from JAR file

查看:131
本文介绍了我怎样才能从JAR文件资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能从JAR文件中的资源?我包括主体工程JAR文件,并尝试从主体工程地质矿产字符串从罐子库调用像 com.jarlibrary.R.string.test ,但我有例外,主应用程序崩溃..其他的方式?

How can i get resources from JAR file? I include to main project JAR file, and try to call from main project resourse string from jar library like com.jarlibrary.R.string.test, but i have exception and main application crash.. other ways?

推荐答案

无法从罐子文件,你只要把类文件和访问,对于接入资源资源,您必须添加文件夹分开在项目资源。

you can't access resource from jar file, you just put class file and access it, for resource you have to add separately folder of resources in your project.

这篇关于我怎样才能从JAR文件资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆