Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

build jar file that includes needed classes automatically  RSS feed

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 23713
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought that maven worked at the jar level, not at the class level. No?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!