TestProject
-src
-com
-entity
-service
-jar system library
-Referened ibrary
-.settings
-lib
-.classpath文件
-.project文件
这是.classpath文件的内容
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="com/service" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="E:/lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="E:/lib/annogen-0.1.0.jar"/>
<classpathentry kind="lib" path="E:/lib/ant-1.7.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
主程序(main)在com/service目录下
看了好多遍 buildpath也试着调了好多次 就是导出成jar运行就 报找不到activation-1.1.com.....依赖的JAR包。如有答案可以解决在继续加分...
6 个解决方案
#1
请尝试把
E:/lib/activation-1.1.jar
E:/lib/annogen-0.1.0.jar
E:/lib/ant-1.7.0.jar
copy到你的项目lib目录下
<classpathentry kind="lib" path="lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="lib/annogen-0.1.0.jar"/>
<classpathentry kind="lib" path="lib/ant-1.7.0.jar"/>
然后是export-runnable jar file-copy required library........
E:/lib/activation-1.1.jar
E:/lib/annogen-0.1.0.jar
E:/lib/ant-1.7.0.jar
copy到你的项目lib目录下
<classpathentry kind="lib" path="lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="lib/annogen-0.1.0.jar"/>
<classpathentry kind="lib" path="lib/ant-1.7.0.jar"/>
然后是export-runnable jar file-copy required library........
#2
如果要方便你或许可以下载一个fatjar的eclipse的插件,打包很方便
#3
参考下这个:
http://blog.csdn.net/fengyun111999/article/details/5787125
http://blog.csdn.net/fengyun111999/article/details/5787125
#4
学习...
#5
关键楼主是不是要在jar包内嵌套jar包,不是的话,只要将jar包放在JRE认可的ClassPath下就行
要嵌套的话,
像2楼说的fatjar
还有one-jar,是用了特殊的classloader来装载nested jars
one-jar.sourceforge.net
要嵌套的话,
像2楼说的fatjar
还有one-jar,是用了特殊的classloader来装载nested jars
one-jar.sourceforge.net
#6
还有一种可能,你确定配置过环境变量了吗?如果没有配,打了包也是没法运行的,eclipse中自带有Jvm
#1
请尝试把
E:/lib/activation-1.1.jar
E:/lib/annogen-0.1.0.jar
E:/lib/ant-1.7.0.jar
copy到你的项目lib目录下
<classpathentry kind="lib" path="lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="lib/annogen-0.1.0.jar"/>
<classpathentry kind="lib" path="lib/ant-1.7.0.jar"/>
然后是export-runnable jar file-copy required library........
E:/lib/activation-1.1.jar
E:/lib/annogen-0.1.0.jar
E:/lib/ant-1.7.0.jar
copy到你的项目lib目录下
<classpathentry kind="lib" path="lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="lib/annogen-0.1.0.jar"/>
<classpathentry kind="lib" path="lib/ant-1.7.0.jar"/>
然后是export-runnable jar file-copy required library........
#2
如果要方便你或许可以下载一个fatjar的eclipse的插件,打包很方便
#3
参考下这个:
http://blog.csdn.net/fengyun111999/article/details/5787125
http://blog.csdn.net/fengyun111999/article/details/5787125
#4
学习...
#5
关键楼主是不是要在jar包内嵌套jar包,不是的话,只要将jar包放在JRE认可的ClassPath下就行
要嵌套的话,
像2楼说的fatjar
还有one-jar,是用了特殊的classloader来装载nested jars
one-jar.sourceforge.net
要嵌套的话,
像2楼说的fatjar
还有one-jar,是用了特殊的classloader来装载nested jars
one-jar.sourceforge.net
#6
还有一种可能,你确定配置过环境变量了吗?如果没有配,打了包也是没法运行的,eclipse中自带有Jvm