How do I build a Java project in Eclipse, to create an external JAR

后端 未结 5 1062
抹茶落季
抹茶落季 2021-01-30 04:32

I recently inherited a large software project written in Java. The last developer used Eclipse, so that\'s what I\'m using, but I can\'t figure out how to build anything. I don\

5条回答
  •  一生所求
    2021-01-30 05:10

    Firstly, Eclipse is always building your project in the background. That doesn't help you much if what you want is a .jar file or web archive that you can deploy or execute. The suggestions about export to jar are correct if that's what you want.

    It's not clear how much Java experience you have, so I'll just ask this - are you sure there are no build scripts? Look for files called .pom, or a build.xml or .gradle files. If the project is as large as you say, I would have to imagine there is some sort of build script/descriptor, but if you're not familiar with Java build systems it may not be obvious to you.

    Eclipse (and just about any modern IDE) is a monstrously complex product, and any one or two line description we may give won't come close to getting you up and running on a large codebase. When you open the project up in eclipse are there red "X" icons on a ton of classes in the source tree? That's typical if you don't have your libraries all set up, which again, is a big topic. It would help to know if you imported a project someone already had up (or are just using their old development box) or if you're starting all this from scratch.

提交回复
热议问题