1

Can anyone tell me how the size of jcommon-1.0.16.jar and jfreechart-1.0.13.jar(mainly jfreechart-1.0.13.jar ) executables can be decreased.i need to reduce size for my embedded product which works on linux environment.

Memory is the biggest problem in embedded...can anyone help me out.

CJ_world
  • 45
  • 10
  • 1
    Can you get the source and build just the classes you need? If you use code coverage this can help determine that. Note: the memory used by the library is mostly images you create, the size of the code is relatively small. – Peter Lawrey Aug 13 '12 at 08:36
  • Cross-posted [here](http://www.jfree.org/forum/viewtopic.php?f=3&t=115565). – trashgod Aug 13 '12 at 18:46

3 Answers3

1

There is a question here that may point you in the right direction. ProGuard was the most popular solution but I'm afraid I'm no direct experience.

Community
  • 1
  • 1
GrahamA
  • 5,875
  • 29
  • 39
  • I have java 1.5 used by my board but ProGaurd seems to be used for java6 and doubt reliability and integrity of the code after its usage. – CJ_world Aug 13 '12 at 08:47
  • Jaba 5 is addressed in the [FAQ](http://proguard.sourceforge.net/#FAQ.html). To check the reliability you could use the Unit Tests included in the JFreeChart distribution. I'm not sure how you would verify the integrity. – GrahamA Aug 13 '12 at 09:27
1

Another option is the Maven Shade Plugin , with its minimizejar option

        <configuration>
          <minimizeJar>true</minimizeJar>
        </configuration>

Remember that only those classes will be included in the jar that have direct dependencies in the code, although Java code can load classes in many other tricky ways.

lbalazscs
  • 17,474
  • 7
  • 42
  • 50
0

I used JCC kit for my target platform and it's less than 100kb library. You need to understand the library and after that you can play without worrying about size. :)

CJ_world
  • 45
  • 10