Redian新闻
>
问个eclipse装jar的入门问题
avatar
问个eclipse装jar的入门问题# Java - 爪哇娇娃
l*e
1
【 以下文字转载自 Immigration 讨论区 】
发信人: leonpce (时来运转), 信区: Immigration
标 题: Question about PERM
发信站: BBS 未名空间站 (Wed Apr 7 11:07:35 2010, 美东)
My EB2 PERM was submitted in Sep. 2009, if it is approved, will my lawyer
get notification from Dept of labor automatically? Or do I need to ask my
lawyer to ask Dept of labor about the status? Thanks a lot.
avatar
n*7
2
想装一个java包,jblas
看教程放到java的classpath就好
windows下默认的第三方包是
C:Program FilesJavajre7libext
我就丢那里了
现在执行是没问题,但是eclipse的editor好像不能access这个包,老是报错(见图)
这是什么原因?
另外,我看一个人说,java在windows下装两遍jre,比如我的
一个是javajre7
一个是Javajdk1.7.0_25jre
为了保险,他每个包都丢两个地方,比如
C:Program FilesJavajre7libext
C:Program FilesJavajdk1.7.0_25jrelibext
这个有必要吗?
谢谢
avatar
g*g
3
If it's a project-related jar, you can put it under lib folder in your
project, right click on the project and add your jar in the classpath.

【在 n******7 的大作中提到】
: 想装一个java包,jblas
: 看教程放到java的classpath就好
: windows下默认的第三方包是
: C:Program FilesJavajre7libext
: 我就丢那里了
: 现在执行是没问题,但是eclipse的editor好像不能access这个包,老是报错(见图)
: 这是什么原因?
: 另外,我看一个人说,java在windows下装两遍jre,比如我的
: 一个是javajre7
: 一个是Javajdk1.7.0_25jre

avatar
n*7
4
你是说build path -> add library吗
这个已经在左侧的JRE system libary里面了
我可能很多project都用到这个包,不想每个project都cp一份...

【在 g*****g 的大作中提到】
: If it's a project-related jar, you can put it under lib folder in your
: project, right click on the project and add your jar in the classpath.

avatar
g*g
5
The issue you have is the class is available in multiple jars, and system
lib path has the low priority in classloader.
You want to remove the jar from system lib and add it to your project. If
you need to build and ship your project, not run from within eclipse every
time, you want to do that any way.
If you really want the jar to be managed and shared, try popular solution
like maven.

【在 n******7 的大作中提到】
: 你是说build path -> add library吗
: 这个已经在左侧的JRE system libary里面了
: 我可能很多project都用到这个包,不想每个project都cp一份...

avatar
n*7
7
谢谢,问题解决了!
这里给的solution是去掉JRE System Library再加回来,因为“Removing and re-
adding the jre lib will make the right classes be first.”
我的问题似乎更搞笑,by default JRE System Library 设置了两遍
我的截屏里面,一个叫JavaSE-1.7,一个叫jre7
我知道java1.7 就是java7,我以为搞两遍有什么兼容性考虑呢
删掉第一个就好了...

【在 g*****g 的大作中提到】
: http://stackoverflow.com/questions/860187/access-restriction-on
: this link suggests the same solution.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。