• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFree library size reduce

 
chirayu joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i reduce the size of jcommon-1.0.16.jar and jfreechart-1.0.13.jar(mainly jfreechart-1.0.13.jar) so that i can use this library in my embedded environment.Size is creating probs for me. Please tell how can i reduce.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fork the project and remove some classes which you won't be using. Also remove the other classes which are only used by the other classes you just removed. Generate a jar file from what is left. Repeat until your size problem goes away.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ProGuard is great for automating this.
 
chirayu joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:ProGuard is great for automating this.


I am not gettig...how to use it.
can you tell how to use or just tell the progaurd command to compress jfreechart-1.0.13.jar
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chirayu joshi wrote:
Ulf Dittmer wrote:ProGuard is great for automating this.


I am not gettig...how to use it.

It's explained in their documentation http://proguard.sourceforge.net/#manual/index.html
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you will need to spend a bit of time learning how to set up a command file for ProGuard. It's well worth the effort.
 
chirayu joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Yes, you will need to spend a bit of time learning how to set up a command file for ProGuard. It's well worth the effort.


Whether Progaurd will reduce the size of jfre library from 1.35mb to less then 200kb......?I am asking because i want to be sure and not waste time in useless work which atlast dont give the required output
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on how many features of the library your code uses. But it better not be a requirement that the library will be reduced that much, because it's entirely unpredictable (and unlikely, IMO) whether or not that's possible. But it shouldn't be more than an hour's time to find out either way.
 
chirayu joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:That depends on how many features of the library your code uses. But it better not be a requirement that the library will be reduced that much, because it's entirely unpredictable (and unlikely, IMO) whether or not that's possible. But it shouldn't be more than an hour's time to find out either way.



Thanks.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic