Results 1 to 1 of 1
Thread: Build java projects with ant
- 08-06-2013, 12:08 PM #1Member
- Join Date
- Aug 2013
- Rep Power
Build java projects with ant
I need help to build java projects with ant.
This java projects where created with netbeans. If I build them using netbeans everything works fine... Building via ant commands works, but then my application fails to start: "Exception in thread "main" java.lang.NoClassDefFoundError".
I already realized (I think) that it is main-class and class-path problems.
I made two experiences and compare the results:
1 - build with netbeans and then distribute
2 - build and distribute by ant command
At my final folder I got:
1 - MyProject/jars with MyProject.jar and every projects and libraries dependencies
2 - MyProject/ with every projects dependencies (but no libraries dependencies) and jars folder with only MyProject.jar
I unpacked both MyProject.jar files and manifest content was:
1 - it includes class-path (with all dependencies) and main-class
2 - it includes main-class but no class-path
I already follow up a lot of suggestions but with no result. Maybe it's me that is doing something wrong. But I am completely lost on this so I would appreciate some help.
What I am looking for, and I don't know if that is possible, is for some command line solution via ant parameters or something. Because MyProject is not that simple, it has a lot of other project dependencies, and change build.xml (or others) for all of them it would be slow...
Thanks in advance.
Last edited by taniamagalhaes; 08-06-2013 at 04:28 PM.
- By Gousia in forum Threads and SynchronizationReplies: 18Last Post: 04-21-2011, 11:58 AM
- By srishti in forum Java SoftwareReplies: 4Last Post: 10-04-2009, 09:02 AM
- By bmelloni in forum EclipseReplies: 2Last Post: 04-03-2009, 03:03 PM
- By Zeke886 in forum New To JavaReplies: 0Last Post: 11-14-2007, 09:41 PM