上善若水
In general the OO style is to use a lot of little objects with a lot of little methods that give us a lot of plug points for overriding and variation. To do is to be -Nietzsche, To bei is to do -Kant, Do be do be do -Sinatra
posts - 146,comments - 147,trackbacks - 0

今天发现把jar文件或.class文件放在系统配置的CLASSPATH目录下,然而在eclipse的工程中却是无法加载的(通过ClassLoader去加载相应的类)。最后我发现eclipse应该是重新设置了CLASSPATH的值了,也正因为这样它才能运行其bin目录下的文件。如打开工程目录下的.classpath文件:

<?xml version="1.0" encoding="UTF-8"?>

<classpath>

         <classpathentry kind="src" path="src"/>

         <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

         <classpathentry kind="lib" path="/DomainInterfaces/bin"/>

         <classpathentry kind="output" path="bin"/>

</classpath>

 

然而如果加入一下内容:

         <classpathentry kind="lib" path="E:\\CodeRepository\\Java\\ExtClassPath" />

重启eclipse,就可以正确的加载CLASSPATH中的内容了。


2011-09-16

posted on 2011-07-20 23:00 DLevin 阅读(10847) 评论(4)  编辑  收藏 所属分类: Core Java

FeedBack:
# re: Eclipse中ClassPath问题[未登录]
2013-03-28 18:53 | 小小
E:\\CodeRepository\\Java\\ExtClassPath 请问这是什么路径?  回复  更多评论
  
# re: Eclipse中ClassPath问题
2013-06-17 18:06 | zvxzvds
vdsvsdvs  回复  更多评论
  
# re: Eclipse中ClassPath问题
2013-06-17 18:06 | zvxzvds
sdfsdfsd  回复  更多评论
  
# re: Eclipse中ClassPath问题
2015-02-04 22:25 | 3
E:\\CodeRepository\\Java\\ExtClassPath 请问这是什么路径?  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: