Reputation: 907
I have had this doubt for a long time . I download a project from the internet . It has the entire set .(The source and the other resources) . I want to build a jar file using eclipse . This might sound simple but since its downloaded from the internet this structure looks confusing and i am unaware as to how a jar file has to be built out of that
Upvotes: 0
Views: 99
Reputation: 6277
If you downloaded the folder, you need to figure out it's root folder that should be src right below trunk. You can figure out the structure from looking at package declaration in java files. Try setting up the package properly in eclipse and it will start working.
But the best way is to look at the source again from where you downloaded and check out the project as svn or something similar. I am sure if it is a fully functional project, it should be available for checkout from repository.
Lastly you probably should rephrase your question.
Upvotes: 1
Reputation: 8598
Have you tried exporting it as jar from eclipse? To do this: Select your project, right click on it and select Export
. Select JAR file
, select next
. Select your project and maintain the export destination and a name for the jar file.
Upvotes: 0
Reputation: 1677
In modern practices, projects often contain build configuration for packaging to jars, deploy to web servers, such as ant, maven for java. If not, i just simply wait for refactoring on build process or do it by myself. Just a thought but not helpful :D
Upvotes: 0
Reputation: 3701
First of all import the project in Eclipse, resolve all its dependencies required by the project, so that there are no compilation errors. Then right click on the project in Eclipse and then select:
Export > Java > Jar
Follow the instructions and this should export out the project as a JAR file.
Upvotes: 1
Reputation: 3001
in eclipse select project
1:right click on project
2: select export
3:java then jar
Upvotes: 1