3

There are a lot of similar questions, but none for this specifically. I have a Netbeans project with a bunch of packages. Only one has Main. I'd like to be able to create a .jar from just one of the packages (and all the classes it contains, of course), which doesn't have main.

Is this feasible without having to put that package in another project or without having to screw around with build.xml? If the latter, any easy way or good rtfm links?

The point is i'm developing part of an application for college, each group member is developing a module of sorts. If each could provide their .jar the main project can just include jars and use them. I'm guessing all the mains in the jars wouldn't really hurt? But still...

Vesperto
  • 33
  • 1
  • 3

1 Answers1

1

You can use the project properties to customize your project's jar file content. This screenshot shows what it looks like for a Java Class Library project.

enter image description here

vkraemer
  • 9,864
  • 2
  • 30
  • 44
  • What that actually does is remove said files from (showing up in) the project itself, therefore they'll be left out of the .jar (however, the manifest still disclaims the main function to be in a class which doesn't exist in the .jar). Not what i had in mind, but it does the trick, thanks :) – Vesperto Jun 10 '11 at 05:48