I am attempting to create a JAR based on two separate Java packages. I can compile and run within Eclipse, but cannot get the code to function from the command line. I have Ant and the JDK correctly configured for usage, as I have an almost working Ant build script. The only problem is that the resulting JAR throws a _**ClassNotFoundException**_ when I attempt to execute it.
The archive contains all the __*.class*__ files from both packages in the correct directory hierarchy. Regardless, the JAR will throw the above mentioned exception.
The idea is to run this script from the top level directory that contains both packages.
Here are the relevant lines from my build script:
how does the jar -tvf jarfile.name look?
以上就是Ant build jar from multiple packages的详细内容，更多请关注web前端其它相关文章！