I am trying to package a class file with 2 jar files that are in my classpath.
CLASSPATH=c:\java\include\ar.jar
Working directory (source/class file) : c:\eclipse\workspace\MyProject
Within my working directory, I am able to compile and run Test.java, creating Test.class. Both files are in my working directory.
Using
Ant, I want a single jar that will include 'ar.jar' and 'Test.class' to be run on another environment. I would like to leave 'ar.jar' in the directory that it is currently in.
Here is my build.xml
The problem is that when I run '
java -jar MyJarFile.jar', I get a NoClassDefFoundError since it is not finding 'ar.jar'. The 'ar.jar' file is packaged in MyJarFile.jar, but I cannot figure out the correct Class-Path to reference 'ar.jar'.
Any advice?