[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Eclipse how to: compile a single file or only few files

Still can not get what I want. I dont know why things are that complicated. OK, again my problem, I am working on a project of many parts, (Server1, Server2, client1, client2,....,commonFiles). Now the commonFiles are in a package called common.util. There are many classes for each part. I need to test the project and use it, the best way is to put every part in a Jar file, for easier access. Now When I compile the package all the files go into on single directory, and the process of sorting them out to create a jar file for each part becomes boring and time consuming, therefore, I decided to choose the files included in each part and use include/exclude from the path then compile into a specific folder and create a jar file. Again this process is length when you have 40+ classes. A member on this list suggested wrapping them in a "source folder". I did, but... getting errors in the source code not being able to see the rest of the classese (package common.util).
Any Help ????




Jeff Myers wrote:

Mansour,
Are the client, server and commonFiles split out into separate projects? You'll probably have an easier time if you make each of them as source folders within the same project, or different packages within the same source folder. Then all of the compiled objects will be put in the same output folder. So for instance, you'd create a new Java project with client "Create separate source and output folders" selected, then on the second page, remove the default src folder in the list, and hit the "Create a new Source Folder for the project" button at the top right, and add client, server and commonFiles. Then at the bottom, change the output folder to targetFolder. Then import your source into the respective folders and everything should compile happily.


Hope this helps,
 - Jeff

Jeff:
Thanx alot, It sound a great idea and close to what I want. I'll try this soon, and let you know. The way I was going to solve this is by including and excluding the files from the path, then compile them into a common folder, then create a jar file from that folder, clean and so the same for the rest of the sections. This seemed to be great, however, I'll try to do them in separate folders. I dont know if this will compile and include "only" the classes I need from the common folder, as the common folder really is a package "NOT A JAR", and it contains alot of files that I dont want to include, I think this wil be the only problem. If you have any suggestion then let me know. thank you.