File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes build jar file that includes needed classes automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "build jar file that includes needed classes automatically" Watch "build jar file that includes needed classes automatically" New topic
Author

build jar file that includes needed classes automatically

Steve Deadsea
Ranch Hand

Joined: Dec 03, 2001
Posts: 125
A few years ago I could have sworn that I read about a jar creation tool that would automatically discover what class files would be needed for a application and build a jar file with just those class files. I believe that you provided it with the name of the class or classes that had entry points (main methods) and it would see what they depended on usiing static analysis. It would look at both things that were compiled as dependencies and things that might be dependencies because of strings that looked like class names to load via reflection.

Such a tool would be really useful to me now, but I can't seem to find it on Google right now. Is anybody familiar with it?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18127
    
    8

That's Maven, isn't it? Although as I understand it, it doesn't build a single jar file, it collects the other jars you need and builds something which can be distributed.
Steve Deadsea
Ranch Hand

Joined: Dec 03, 2001
Posts: 125
I thought that maven worked at the jar level, not at the class level. No?
 
Don't get me started about those stupid light bulbs.
 
subject: build jar file that includes needed classes automatically
 
Similar Threads
how to create WAR files
Using Eclipse 3.1.0 IDE, JBOSS 4.0.0 server & ANT as build tool
eclipse - error with exporting jar
merge multiple jars into one jar?
organizing classes into packages