由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - classpath 和 lib/ext 的区别?
相关主题
大家愿意讨论一下log4j么问个eclipse装jar的入门问题
JSP How to Invoke the Specific version of Xerces-J如何获得类定义的public methods?
com.sun.tools.javac.Main 问题ant javac error in eclipse 3.0?
Help!: tomcat classloading problemRe: Desperately need help on DB2 connection through jdbc in jsp page
Re: Help!: tomcat classloading problem[转载] Urgent Help needed about Java Servlet?
问个java logger的问题Re: JSP菜鸟一问
slf4j好像还不错Axis1.2RC3问题
[合集] How to get all classes under a package?问个eclipse的问题
相关话题的讨论汇总
话题: lib话题: ext话题: classpath
进入Java版参与讨论
1 (共1页)
l*********s
发帖数: 5409
1
I am trying to compile demo of jasperreport, funny thing is that, if I put
the appache common logging/beanutil jars in the %JAVA%\lib\ext, compiling is
OK.
But if the libraries locate in somewhere else, and referenced through %
classpath%, ant complains. Why is such a different behavior?
r*****l
发帖数: 2859
2
Java load class的顺序是:
1,bootstrap classloader,load最基本的runtime classes。bootstrap classloader
在Java世界里基本是神一样的class,有着不受Java规则制约的行为。
2,extension classloader,它load你放在java\lib\ext里面的jar。一般这个目录里
面放一些OS dependent的东西,等等。
3,system classloader,应该是AppClassLoader,load classpath里面的,WEB-INF\
lib里面的classes。
jasperreport的东西尽量用system loader来load。ant complaint应该是没设置好的缘
故。

is

【在 l*********s 的大作中提到】
: I am trying to compile demo of jasperreport, funny thing is that, if I put
: the appache common logging/beanutil jars in the %JAVA%\lib\ext, compiling is
: OK.
: But if the libraries locate in somewhere else, and referenced through %
: classpath%, ant complains. Why is such a different behavior?

l*********s
发帖数: 5409
3
Thank you, realBull!
m*****k
发帖数: 731
4
maybe some class conflicting, such as what you need is xxx.class ver 3 in
beanutil.jar while some other jar contains xxx.class ver2 .
S****h
发帖数: 558
5
Common log use other library (log4J for example) to do the real log job. It
searches certain folder for a logger library and search rules are quite
complicated. So I guess it might be important to sit in CORRECT place. I
think that is one reason lots of new library try to dump it for other log
facade.
1 (共1页)
进入Java版参与讨论
相关主题
问个eclipse的问题 Re: Help!: tomcat classloading problem
Eclipse可以让一个项目使用refer另一个项目吗问个java logger的问题
get full class nameslf4j好像还不错
generics这样改对马?[合集] How to get all classes under a package?
大家愿意讨论一下log4j么问个eclipse装jar的入门问题
JSP How to Invoke the Specific version of Xerces-J如何获得类定义的public methods?
com.sun.tools.javac.Main 问题ant javac error in eclipse 3.0?
Help!: tomcat classloading problemRe: Desperately need help on DB2 connection through jdbc in jsp page
相关话题的讨论汇总
话题: lib话题: ext话题: classpath