ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Molloy <mmol...@RESORTQUEST.com>
Subject Compile question--Class not found
Date Thu, 02 Aug 2001 14:41:10 GMT
Just started using Ant, and I can already appreciate all the work that has
been put into it. Great tool.

However, I'm having a bit of a problem. I've got packageA and packageB.
packageA uses some classes in packageB. I tried the following using ant.

1. Compile packageB
2. Put the jar in ant/lib.
3. Compile packageA.
4. Move both jar files to my Windows 2000 development box.
5. Issued the java command: java -cp packageB.jar;packageA.jar MainClass

This worked some of the time, but most of the time I got a
ClassNotFoundException: packageB/SomeClass. The class is there, though.

The only way I could get this to work was to move the packageB source files
into the packageA directory and then call ant on packageA. The resulting
single jar file packageA.jar works fine everytime. The problem is that I use
packageB classes in other applications, so this is not an optimal solution. 

Anyone have any suggestions? If it makes a difference, I'm compiling
everything on SuSE 7.1 with Sun JDK build 1.3.1-b24.

Thanks for any help.

--Michael

Mime
View raw message