Don't do it the hard way. Use Eclipse's own exporter. First ensure that you've the other projects referenced as Projects in the main project's Build Path. Once done that, just rightclick the main project, choose Export and then Java > Runnable JAR file. Choose the launch configuration (which you used to test the main()
class locally) and then you've 3 Library Handling options to package the JAR:

The first option will just repackage the classes of other projects inside the JAR. Everything is plain thrown together.
The second option will copy other projects as JARs inside the JAR. This does normally not work that way, but Eclipse also adds a special launcher which basically copies the embedded JARs into memory, extracts there, adds the files to the classloader and then invoke the main()
with that classloader.
The third option is something you don't want for this particular case.