• Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding what class files are being used  RSS feed

 
Andrew Mcmurray
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Recently our custmomer wanted some new functionality added. This functionality was coded within within the project and was going to be deployed next time we pushed the build. They just decided they needed it right away. Pushing the build early is not possible since this would affect a lot of our developers in mid work. I basically wrote up a driver that only called this piece.

So what I need to do if figure out all the class files that this driver is using, jar them up and then just push this striped down jar. Is there anyway to figure out all the class files that are being used?

Thanks,

AMD
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are many things I dont understand here. What is this "driver" ? What is a "push this striped down jar" ? Your import statements should give you a good idea of what class files are being used. You can also used the -verbose flag of the java command to check which classes are loaded by the JVM, but that is likely to return a lot of class names that do not include your business logic. Perhaps you could filter from the output, all the classes who's packages do not belong to your business classes.
 
Andrew Mcmurray
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

The driver is just some class with a main that just calls the new funtionality. A push is just ftping the whole project build to the Customer. Basically there is a ton of stuff that doesn't need to be included in what they want immediatly. So I want to only "push" a stripped jar of the class that contains the main and all the required depenancies for the call to the new stuff.

Thanks,

AMD
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is (or was) a tool called FatJar that attempted to follow the references from one class to another and build a jar with exactly what your application needs. I tend to load a lot of classes via class.forName().newInstance() with classnames in configuration. FatJar would miss those for sure.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!